diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-08-01 16:25:06 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:16 -0500 |
commit | 6681dcb849233deecf37d8b2c2968c13610ce0e9 (patch) | |
tree | 548a98583f8067f668a5df410499a9b8e7b47b25 | |
parent | 4dcd2063070de13fd66edb28f0dddb62e6297884 (diff) |
[Bug, Database] Fix publishing delay migration
-rw-r--r-- | app/models/publishing_delay.rb | 8 | ||||
-rw-r--r-- | db/migrate/20200801210543_add_accounts_to_publishing_delays.rb | 2 | ||||
-rw-r--r-- | db/schema.rb | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/app/models/publishing_delay.rb b/app/models/publishing_delay.rb index 0f943c8ce..e228cd577 100644 --- a/app/models/publishing_delay.rb +++ b/app/models/publishing_delay.rb @@ -2,10 +2,10 @@ # # Table name: publishing_delays # -# id :bigint(8) not null, primary key -# status_id :bigint(8) not null -# after :datetime -# accounts_id :bigint(8) not null +# id :bigint(8) not null, primary key +# status_id :bigint(8) not null +# after :datetime +# account_id :bigint(8) not null # class PublishingDelay < ApplicationRecord diff --git a/db/migrate/20200801210543_add_accounts_to_publishing_delays.rb b/db/migrate/20200801210543_add_accounts_to_publishing_delays.rb index 0c720d30c..21f29aab8 100644 --- a/db/migrate/20200801210543_add_accounts_to_publishing_delays.rb +++ b/db/migrate/20200801210543_add_accounts_to_publishing_delays.rb @@ -3,7 +3,7 @@ class AddAccountsToPublishingDelays < ActiveRecord::Migration[5.2] def change safety_assured do - add_reference :publishing_delays, :accounts, null: false, foreign_key: { on_delete: :cascade }, index: { algorithm: :concurrently } + add_reference :publishing_delays, :account, null: false, foreign_key: { on_delete: :cascade }, index: { algorithm: :concurrently } end end end diff --git a/db/schema.rb b/db/schema.rb index fb280b54f..6346c6804 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -714,8 +714,8 @@ ActiveRecord::Schema.define(version: 2020_08_01_210543) do create_table "publishing_delays", force: :cascade do |t| t.bigint "status_id", null: false t.datetime "after" - t.bigint "accounts_id", null: false - t.index ["accounts_id"], name: "index_publishing_delays_on_accounts_id" + t.bigint "account_id", null: false + t.index ["account_id"], name: "index_publishing_delays_on_account_id" t.index ["after"], name: "index_publishing_delays_on_after" t.index ["status_id"], name: "index_publishing_delays_on_status_id" end @@ -1079,7 +1079,7 @@ ActiveRecord::Schema.define(version: 2020_08_01_210543) do add_foreign_key "poll_votes", "polls", on_delete: :cascade add_foreign_key "polls", "accounts", on_delete: :cascade add_foreign_key "polls", "statuses", on_delete: :cascade - add_foreign_key "publishing_delays", "accounts", column: "accounts_id", on_delete: :cascade + add_foreign_key "publishing_delays", "accounts", on_delete: :cascade add_foreign_key "publishing_delays", "statuses", on_delete: :cascade add_foreign_key "queued_boosts", "accounts", on_delete: :cascade add_foreign_key "queued_boosts", "statuses", on_delete: :cascade |