aboutsummaryrefslogtreecommitdiffstats
path: root/test/dummy/db
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2018-06-27 16:20:58 +0200
committerGitHub <noreply@github.com>2018-06-27 16:20:58 +0200
commitb430ba4754f59934acb4806c83d10dee5af8de9e (patch)
tree1d7482d313f05a800f63a3a490293c9593b2a6a2 /test/dummy/db
parenta4af9580d604221ec36d2cd5671eb7f256ae5173 (diff)
parent60050ee41275eda25601beaa453e26841511d492 (diff)
downloadrails-b430ba4754f59934acb4806c83d10dee5af8de9e.tar.gz
rails-b430ba4754f59934acb4806c83d10dee5af8de9e.tar.bz2
rails-b430ba4754f59934acb4806c83d10dee5af8de9e.zip
Merge pull request #1 from basecamp/separate-rich-text-record
Separate Rich Text record
Diffstat (limited to 'test/dummy/db')
-rw-r--r--test/dummy/db/migrate/20180208205311_create_messages.rb2
-rw-r--r--test/dummy/db/migrate/2018052816_create_action_text_tables.rb14
-rw-r--r--test/dummy/db/schema.rb11
3 files changed, 24 insertions, 3 deletions
diff --git a/test/dummy/db/migrate/20180208205311_create_messages.rb b/test/dummy/db/migrate/20180208205311_create_messages.rb
index 6817d5933f..8e43559672 100644
--- a/test/dummy/db/migrate/20180208205311_create_messages.rb
+++ b/test/dummy/db/migrate/20180208205311_create_messages.rb
@@ -2,8 +2,6 @@ class CreateMessages < ActiveRecord::Migration[5.2]
def change
create_table :messages do |t|
t.string :subject
- t.text :content
-
t.timestamps
end
end
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..872987749a
--- /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, limit: 16777215, 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
diff --git a/test/dummy/db/schema.rb b/test/dummy/db/schema.rb
index f892368183..30bf844e9c 100644
--- a/test/dummy/db/schema.rb
+++ b/test/dummy/db/schema.rb
@@ -12,6 +12,16 @@
ActiveRecord::Schema.define(version: 2018_02_12_164506) do
+ create_table "action_text_rich_texts", force: :cascade do |t|
+ t.string "name", null: false
+ t.text "body", limit: 16777215, null: false
+ t.string "record_type", null: false
+ t.integer "record_id", null: 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
+
create_table "active_storage_attachments", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false
@@ -35,7 +45,6 @@ ActiveRecord::Schema.define(version: 2018_02_12_164506) do
create_table "messages", force: :cascade do |t|
t.string "subject"
- t.text "content"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end