2019-01-05 00:43:11 +00:00
|
|
|
class CreateActionTextTables < ActiveRecord::Migration[6.0]
|
2018-05-29 14:13:19 +00:00
|
|
|
def change
|
|
|
|
create_table :action_text_rich_texts do |t|
|
|
|
|
t.string :name, null: false
|
2019-01-25 13:01:07 +00:00
|
|
|
t.text :body, size: :long
|
2018-05-29 14:13:19 +00:00
|
|
|
t.references :record, null: false, polymorphic: true, index: false
|
|
|
|
|
2019-01-18 00:57:10 +00:00
|
|
|
t.timestamps
|
2018-05-29 14:13:19 +00:00
|
|
|
|
|
|
|
t.index [ :record_type, :record_id, :name ], name: "index_action_text_rich_texts_uniqueness", unique: true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|