The code powering m.abunchtell.com https://m.abunchtell.com
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

20 linhas
816 B

  1. class CreateBlockMutes < ActiveRecord::Migration[5.0]
  2. def change
  3. create_table "block_mutes", force: :casecade do |t|
  4. t.integer "account_id", null: false
  5. t.integer "target_account_id", null: false
  6. t.boolean "block", null: false
  7. t.datetime "created_at", null: false
  8. t.datetime "updated_at", null: false
  9. end
  10. add_column :blocks, :block, :boolean, null: false
  11. execute "ALTER TABLE blocks ADD CONSTRAINT check_mutes_on_block CHECK(block = TRUE), INHERIT block_mutes"
  12. Block.update_all block: true
  13. add_column :mutes, :block, :boolean, null: false
  14. execute "ALTER TABLE mutes ADD CONSTRAINT check_mutes_on_block CHECK(block = FALSE), INHERIT block_mutes"
  15. Mute.update_all block: false
  16. end
  17. end