17 lines
422 B
Ruby
17 lines
422 B
Ruby
class CreateFaFavIdAndDates < ActiveRecord::Migration[7.2]
|
|
def change
|
|
mirai_tablespace!
|
|
|
|
create_table :domain_fa_fav_id_and_dates do |t|
|
|
t.references :user, null: false, foreign_key: { to_table: :domain_users }
|
|
t.integer :post_fa_id
|
|
t.integer :fav_fa_id
|
|
t.datetime :date
|
|
t.timestamps
|
|
|
|
t.index %i[user_id post_fa_id], unique: true
|
|
t.index %i[fav_fa_id]
|
|
end
|
|
end
|
|
end
|