From aa42bf20275c797d890852416d35dd1a54881fe4 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 28 May 2018 17:42:41 +0200 Subject: Table needed for Rich Text AR model --- db/migrate/201805281641_create_action_text_tables.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 db/migrate/201805281641_create_action_text_tables.rb (limited to 'db') diff --git a/db/migrate/201805281641_create_action_text_tables.rb b/db/migrate/201805281641_create_action_text_tables.rb new file mode 100644 index 0000000000..80bcb5cdbc --- /dev/null +++ b/db/migrate/201805281641_create_action_text_tables.rb @@ -0,0 +1,14 @@ +class CreateActionTextTables < ActiveRecord::Migration[5.2] + def change + create_table :action_text_rich_texts do |t| + t.string :name, null: false + t.text :body, null: false + t.references :record, null: false, polymorphic: true, index: false + + t.datetime :created_at, null: false + t.datetime :updated_at, null: false + + t.index [ :record_type, :record_id, :name ], name: "index_action_text_rich_texts_uniqueness", unique: true + end + end +end -- cgit v1.2.3