aboutsummaryrefslogtreecommitdiffstats
path: root/actiontext
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-01-26 23:37:17 +0900
committerGitHub <noreply@github.com>2019-01-26 23:37:17 +0900
commit5a8f0c7226b2b16c9cf1b6ef5478fe5603348e17 (patch)
tree61807c95af11f48d9d31a47ef7599f39c08794ac /actiontext
parentd90593d0deabb90ac5cfdf767f2f037337bb4d31 (diff)
parent57015cdfa2083351f64a82f7566965172a41efcb (diff)
downloadrails-5a8f0c7226b2b16c9cf1b6ef5478fe5603348e17.tar.gz
rails-5a8f0c7226b2b16c9cf1b6ef5478fe5603348e17.tar.bz2
rails-5a8f0c7226b2b16c9cf1b6ef5478fe5603348e17.zip
Merge pull request #34970 from kamipo/timestamps_with_precision_by_default
Make `t.timestamps` with precision by default.
Diffstat (limited to 'actiontext')
-rw-r--r--actiontext/test/dummy/db/migrate/2018052816_create_action_text_tables.rb3
-rw-r--r--actiontext/test/dummy/db/schema.rb12
2 files changed, 7 insertions, 8 deletions
diff --git a/actiontext/test/dummy/db/migrate/2018052816_create_action_text_tables.rb b/actiontext/test/dummy/db/migrate/2018052816_create_action_text_tables.rb
index 74c7a0ecb9..6e7177620f 100644
--- a/actiontext/test/dummy/db/migrate/2018052816_create_action_text_tables.rb
+++ b/actiontext/test/dummy/db/migrate/2018052816_create_action_text_tables.rb
@@ -5,8 +5,7 @@ class CreateActionTextTables < ActiveRecord::Migration[6.0]
t.text :body, limit: 16777215
t.references :record, null: false, polymorphic: true, index: false
- t.datetime :created_at, null: false
- t.datetime :updated_at, null: false
+ t.timestamps
t.index [ :record_type, :record_id, :name ], name: "index_action_text_rich_texts_uniqueness", unique: true
end
diff --git a/actiontext/test/dummy/db/schema.rb b/actiontext/test/dummy/db/schema.rb
index 7f8f4dff4e..71080a1c69 100644
--- a/actiontext/test/dummy/db/schema.rb
+++ b/actiontext/test/dummy/db/schema.rb
@@ -17,8 +17,8 @@ ActiveRecord::Schema.define(version: 2018_10_03_185713) do
t.text "body", limit: 16777215
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.datetime "created_at", precision: 6, null: false
+ t.datetime "updated_at", precision: 6, null: false
t.index ["record_type", "record_id", "name"], name: "index_action_text_rich_texts_uniqueness", unique: true
end
@@ -45,14 +45,14 @@ ActiveRecord::Schema.define(version: 2018_10_03_185713) do
create_table "messages", force: :cascade do |t|
t.string "subject"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at", precision: 6, null: false
+ t.datetime "updated_at", precision: 6, null: false
end
create_table "people", force: :cascade do |t|
t.string "name"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
+ t.datetime "created_at", precision: 6, null: false
+ t.datetime "updated_at", precision: 6, null: false
end
end