The code powering m.abunchtell.com https://m.abunchtell.com
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 

13 行
482 B

  1. class CreateListAccounts < ActiveRecord::Migration[5.1]
  2. def change
  3. create_table :list_accounts do |t|
  4. t.belongs_to :list, foreign_key: { on_delete: :cascade }, null: false
  5. t.belongs_to :account, foreign_key: { on_delete: :cascade }, null: false
  6. t.belongs_to :follow, foreign_key: { on_delete: :cascade }, null: false
  7. end
  8. add_index :list_accounts, [:account_id, :list_id], unique: true
  9. add_index :list_accounts, [:list_id, :account_id]
  10. end
  11. end