You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
glitchier-soc/db/migrate/20221124114030_create_statu...

15 lines
579 B

class CreateStatusReactions < ActiveRecord::Migration[6.1]
def change
create_table :status_reactions do |t|
t.references :account, null: false, foreign_key: { on_delete: :cascade }
t.references :status, null: false, foreign_key: { on_delete: :cascade }
t.string :name, null: false, default: ''
t.references :custom_emoji, null: true, foreign_key: { on_delete: :cascade }
t.timestamps
end
add_index :status_reactions, [:account_id, :status_id, :name], unique: true, name: :index_status_reactions_on_account_id_and_status_id
end
end