aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2018-05-28 17:42:41 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2018-05-28 17:42:41 +0200
commitaa42bf20275c797d890852416d35dd1a54881fe4 (patch)
tree2d59a13d5c599d8f37f0da3cdb1736ddb71b3b54 /db
parent34468ca4ccb2cc3dabd321a7f7b2d87ca0f2ca2a (diff)
downloadrails-aa42bf20275c797d890852416d35dd1a54881fe4.tar.gz
rails-aa42bf20275c797d890852416d35dd1a54881fe4.tar.bz2
rails-aa42bf20275c797d890852416d35dd1a54881fe4.zip
Table needed for Rich Text AR model
Diffstat (limited to 'db')
-rw-r--r--db/migrate/201805281641_create_action_text_tables.rb14
1 files changed, 14 insertions, 0 deletions
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