我在恢复上次迁移时遇到问题。
自从我安装了 'letrate' gem 进行评级以来,所有的结果都rake db:rollback
准确地恢复了letrate gem迁移,而不是预期的最后一次迁移。
我怀疑这是由于宝石本身。
任何想法如何解决这个问题,所以我可以享受非常方便的回滚?
同样的问题:
rake db:migrate:redo
结果:
== CreateRates: reverting ====================================================
-- drop_table(:rates)
-> 0.0224s
== CreateRates: reverted (0.0225s) ===========================================
== CreateRates: migrating ====================================================
-- create_table(:rates)
NOTICE: CREATE TABLE will create implicit sequence "rates_id_seq" for serial column "rates.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "rates_pkey" for table "rates"
-> 0.1787s
-- add_index(:rates, :rater_id)
-> 0.0032s
-- add_index(:rates, [:rateable_id, :rateable_type])
-> 0.0024s
== CreateRates: migrated (0.1850s) ===========================================
耙分贝:迁移:状态
...
up 20121205224038 Rename user address column
up 20121206125016587 ********** NO FILE **********
up 20121206125016605 ********** NO FILE **********
up 20121210152550 Create reservations
up 20121210180233 Create transactions
up 20121210215840 ********** NO FILE **********
up 20121218144200 Create videos
up 20121218144800 Add video to videos
up 20130108225007 Devise invitable add to users
up 20130130202046 Acts as taggable on migration
up 20130205154206 Create commissions
up 20130207133520 Add user id to event transition
和文件
-rw-r--r--@ 1 joel staff 137 Dec 7 16:40 20121205224038_rename_user_address_column.rb
-rw-r--r--@ 1 joel staff 443 Dec 7 16:40 20121206125016587_create_rating_caches.rb
-rw-r--r--@ 1 joel staff 432 Dec 7 16:40 20121206125016605_create_rates.rb
-rw-r--r--@ 1 joel staff 429 Dec 10 23:30 20121210152550_create_reservations.rb
-rw-r--r--@ 1 joel staff 414 Dec 10 19:03 20121210180233_create_transactions.rb
-rw-r--r--@ 1 joel staff 237 Dec 18 15:44 20121218144200_create_videos.rb
-rw-r--r--@ 1 joel staff 172 Dec 18 16:18 20121218144800_add_video_to_videos.rb
-rw-r--r--@ 1 joel staff 758 Jan 8 23:50 20130108225007_devise_invitable_add_to_users.rb
-rw-r--r-- 1 joel admin 775 Jan 30 21:20 20130130202046_acts_as_taggable_on_migration.rb
-rw-r--r--@ 1 joel admin 422 Feb 5 17:05 20130205154206_create_commissions.rb
-rw-r--r--@ 1 joel admin 266 Feb 7 15:20 20130207133520_add_user_id_to_event_transition.rb