summaryrefslogtreecommitdiff
path: root/generate.sh
diff options
context:
space:
mode:
Diffstat (limited to 'generate.sh')
-rwxr-xr-xgenerate.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/generate.sh b/generate.sh
index c6e63dd..db9e84b 100755
--- a/generate.sh
+++ b/generate.sh
@@ -18,24 +18,30 @@ git checkout clean-start -- app test config/routes.rb
# The whole shebang, models, views, and controllers
bundle exec rails generate scaffold server --force $NOTEST
-bundle exec rails generate scaffold tournament game:references min_players_per_team:integer max_players_per_team:integer min_teams_per_match:integer max_teams_per_match:integer set_rounds:integer randomized_teams:boolean status:integer $NOTEST
bundle exec rails generate scaffold match tournament:references name:string --force $NOTEST
bundle exec rails generate scaffold team match:references $NOTEST
bundle exec rails generate scaffold alert author:references message:text $NOTEST
bundle exec rails generate scaffold pm author:references recipient:references message:text $NOTEST
-bundle exec rails generate scaffold game name:text min_players_per_team:integer max_players_per_team:integer min_teams_per_match:integer max_teams_per_match:integer set_rounds:integer randomized_teams:boolean --force $NOTEST
+bundle exec rails generate scaffold tournament game:references status:integer \
+ min_players_per_team:integer max_players_per_team:integer \
+ min_teams_per_match:integer max_teams_per_match:integer \
+ set_rounds:integer randomized_teams:boolean
+bundle exec rails generate scaffold game \
+ name:text \
+ min_players_per_team:integer max_players_per_team:integer \
+ min_teams_per_match:integer max_teams_per_match:integer \
+ set_rounds:integer randomized_teams:boolean
bundle exec rails generate scaffold user name:string email:string:uniq user_name:string:uniq
bundle exec rails generate scaffold session user:references
-
# Just models
bundle exec rails generate model server_settings $NOTEST
bundle exec rails generate model tournament_option tournament:references vartype:integer name:string value:text $NOTEST
bundle exec rails generate model game_option vartype:integer name:string default:text $NOTEST
bundle exec rails generate model score user:references match:references value:integer $NOTEST
-# Bridge Models
-bundle exec rails generate model tournament_user_pair tournament:references user:references $NOTEST
+# Bridge Models
bundle exec rails generate model user_team_pair user:references team:references $NOTEST
+bundle exec rails generate model user_tournament_pair user:references tournament:references
bundle exec rails generate model team_match_pair team:references match:references $NOTEST
# Just controllers