From ddfc963d35dc1ecd7e78af9cd96ed4ce058a8dc8 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 29 May 2018 16:13:07 +0200 Subject: Content is now supplied by dedicated model --- test/dummy/db/migrate/20180208205311_create_messages.rb | 2 -- test/dummy/db/schema.rb | 11 ++++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'test/dummy/db') 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/schema.rb b/test/dummy/db/schema.rb index f892368183..67668b6e78 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", 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 -- cgit v1.2.3 From 4b6509c6f28edf40dbb4a284dd1d7f3fd583971f Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 29 May 2018 16:13:19 +0200 Subject: Adding the rich text tables --- .../db/migrate/2018052816_create_action_text_tables.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/dummy/db/migrate/2018052816_create_action_text_tables.rb (limited to 'test/dummy/db') 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 -- cgit v1.2.3 From f27a0c88e0e48b1b4f4b64590443e0bb23c6738e Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 29 May 2018 16:24:48 +0200 Subject: Use mediumtext-size columns Room to grow, room to flourish! --- test/dummy/db/migrate/2018052816_create_action_text_tables.rb | 2 +- test/dummy/db/schema.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'test/dummy/db') diff --git a/test/dummy/db/migrate/2018052816_create_action_text_tables.rb b/test/dummy/db/migrate/2018052816_create_action_text_tables.rb index 80bcb5cdbc..872987749a 100644 --- a/test/dummy/db/migrate/2018052816_create_action_text_tables.rb +++ b/test/dummy/db/migrate/2018052816_create_action_text_tables.rb @@ -2,7 +2,7 @@ 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.text :body, limit: 16777215, null: false t.references :record, null: false, polymorphic: true, index: false t.datetime :created_at, null: false diff --git a/test/dummy/db/schema.rb b/test/dummy/db/schema.rb index 67668b6e78..30bf844e9c 100644 --- a/test/dummy/db/schema.rb +++ b/test/dummy/db/schema.rb @@ -14,7 +14,7 @@ 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", 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 -- cgit v1.2.3