diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-07-31 21:39:29 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:16 -0500 |
commit | 52b500e482180b20bb988c09c07c39a492512c31 (patch) | |
tree | f271a673bcc6c4a18a8ecaf77cec7f4cbadd0182 /db/migrate/20200731205913_create_queued_boosts.rb | |
parent | d21652f4f0a1c756402a11826ccd93cb6081be59 (diff) |
[Feature, Database] Add migrations and models for queued boosts, delayed publishing, and self-destructing posts
Diffstat (limited to 'db/migrate/20200731205913_create_queued_boosts.rb')
-rw-r--r-- | db/migrate/20200731205913_create_queued_boosts.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20200731205913_create_queued_boosts.rb b/db/migrate/20200731205913_create_queued_boosts.rb new file mode 100644 index 000000000..33ddbb966 --- /dev/null +++ b/db/migrate/20200731205913_create_queued_boosts.rb @@ -0,0 +1,10 @@ +class CreateQueuedBoosts < ActiveRecord::Migration[5.2] + def change + create_table :queued_boosts do |t| + t.references :account, null: false, foreign_key: { on_delete: :cascade } + t.references :status, null: false, foreign_key: { on_delete: :cascade } + end + + add_index :queued_boosts, [:account_id, :status_id], unique: true + end +end |