Fantastic visual voting application for events. Create an event-based online polling platform that allow users to share, vote and discover interesting things.
Yuxi Chen | Niyan Ying | Yao-Jen Chang | Qianyun Zhu |
@muxin | @Tiffanyyny | @autekroy | @sunnyuny |
https://www.pivotaltracker.com/n/projects/1321156
rake db:migrate VERSION=20080906120000
- run the required migrations until it has reached the specified version
rake db:rollback
- rollback the last migration
rake db:setup
- create the database, load the schema and initialize it with the seed data
rake db:reset
- drop the database and set it up again. equivalent to
rake db:drop db:setup
- drop the database and set it up again. equivalent to
rake db:migrate
- runs the change method for all the migrations that have not yet been run
- Generate new migration file under db/migrate
rails g migration ChangeTableOnSomeAttributes
- Modify db/migrate/XXXXXXXX_change_table_on_some_attributes.rb file to include the changes
class ChangeTableOnSomeAttributes < ActiveRecord::Migration
def change
change_column :posts, :vote_count, :integer
change_column_null :posts, :vote_count, false
change_column_default :posts, :vote_count, 0
end
end
rake db:migrate
- Check corresponding changes in file db/schema.rb
- Modify file db/seeds.rb to follow new table schema
rake db:reset