about summary refs log tree commit diff
path: root/db/migrate/20220613110628_create_custom_filter_keywords.rb
blob: 353fc334f0a9e62396460ce606b715b2f80ebdba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

class CreateCustomFilterKeywords < ActiveRecord::Migration[6.1]
  def change
    create_table :custom_filter_keywords do |t|
      t.belongs_to :custom_filter, foreign_key: { on_delete: :cascade }, null: false
      t.text :keyword, null: false, default: ''
      t.boolean :whole_word, null: false, default: true

      t.timestamps
    end
  end
end