about summary refs log tree commit diff
path: root/db/migrate
diff options
context:
space:
mode:
authornullkal <nullkal@nil.nu>2017-09-23 02:32:57 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-09-22 19:32:57 +0200
commitdcfc9b220462533c8bcdebc7ca25a68fa23aaf5f (patch)
treeedac5b5b7f006517d899ca3f8f9cf9f28f211284 /db/migrate
parentb01ab55ed83faddef4cc5c67ebbe5f72c9cad832 (diff)
Fix the migration error when deprecated_preview_cards has been deleted (#5043)
* Fix the migration error when deprecated_preview_cards has deleted

* Re-run Travis CI
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20170918125918_ids_to_bigints.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/migrate/20170918125918_ids_to_bigints.rb b/db/migrate/20170918125918_ids_to_bigints.rb
index 9c81ecc05..7483dd77a 100644
--- a/db/migrate/20170918125918_ids_to_bigints.rb
+++ b/db/migrate/20170918125918_ids_to_bigints.rb
@@ -8,7 +8,7 @@ class IdsToBigints < ActiveRecord::Migration[5.1]
     change_column :blocks, :target_account_id, :bigint
     change_column :conversation_mutes, :account_id, :bigint
     change_column :conversation_mutes, :id, :bigint
-    change_column :deprecated_preview_cards, :id, :bigint
+    change_column :deprecated_preview_cards, :id, :bigint if table_exists?(:deprecated_preview_cards)
     change_column :domain_blocks, :id, :bigint
     change_column :favourites, :account_id, :bigint
     change_column :favourites, :id, :bigint
@@ -71,7 +71,7 @@ class IdsToBigints < ActiveRecord::Migration[5.1]
     change_column :blocks, :target_account_id, :integer
     change_column :conversation_mutes, :account_id, :integer
     change_column :conversation_mutes, :id, :integer
-    change_column :deprecated_preview_cards, :id, :integer
+    change_column :deprecated_preview_cards, :id, :integer if table_exists?(:deprecated_preview_cards)
     change_column :domain_blocks, :id, :integer
     change_column :favourites, :account_id, :integer
     change_column :favourites, :id, :integer