aboutsummaryrefslogtreecommitdiffstats
path: root/test/dummy/db/migrate/2018052816_create_action_text_tables.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2018-05-29 16:13:19 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2018-05-29 16:13:19 +0200
commit4b6509c6f28edf40dbb4a284dd1d7f3fd583971f (patch)
treecea78327bec8d9e2bbec38b170690ef6b511c28b /test/dummy/db/migrate/2018052816_create_action_text_tables.rb
parentddfc963d35dc1ecd7e78af9cd96ed4ce058a8dc8 (diff)
downloadrails-4b6509c6f28edf40dbb4a284dd1d7f3fd583971f.tar.gz
rails-4b6509c6f28edf40dbb4a284dd1d7f3fd583971f.tar.bz2
rails-4b6509c6f28edf40dbb4a284dd1d7f3fd583971f.zip
Adding the rich text tables
Diffstat (limited to 'test/dummy/db/migrate/2018052816_create_action_text_tables.rb')
-rw-r--r--test/dummy/db/migrate/2018052816_create_action_text_tables.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/dummy/db/migrate/2018052816_create_action_text_tables.rb b/test/dummy/db/migrate/2018052816_create_action_text_tables.rb
new file mode 100644
index 0000000000..80bcb5cdbc
--- /dev/null
+++ b/test/dummy/db/migrate/2018052816_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