diff options
author | George Claghorn <george@basecamp.com> | 2017-07-07 19:16:41 -0400 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2017-07-07 19:16:46 -0400 |
commit | 29d65e90802bd93e8d36d4c67569bed0b013cb99 (patch) | |
tree | 8a87395fc8292566bd905d64f71d8dde9e87764e /lib/active_storage | |
parent | 44aab4d65931175628b1aa6b1fe3e4152b64e6a9 (diff) | |
download | rails-29d65e90802bd93e8d36d4c67569bed0b013cb99.tar.gz rails-29d65e90802bd93e8d36d4c67569bed0b013cb99.tar.bz2 rails-29d65e90802bd93e8d36d4c67569bed0b013cb99.zip |
Change type of created_at columns from time to datetime
We intend to store a date and time, not merely a time.
Diffstat (limited to 'lib/active_storage')
-rw-r--r-- | lib/active_storage/migration.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/active_storage/migration.rb b/lib/active_storage/migration.rb index fe08e80127..433dd5026f 100644 --- a/lib/active_storage/migration.rb +++ b/lib/active_storage/migration.rb @@ -1,13 +1,13 @@ class ActiveStorageCreateTables < ActiveRecord::Migration[5.1] def change create_table :active_storage_blobs do |t| - t.string :key - t.string :filename - t.string :content_type - t.text :metadata - t.integer :byte_size - t.string :checksum - t.time :created_at + t.string :key + t.string :filename + t.string :content_type + t.text :metadata + t.integer :byte_size + t.string :checksum + t.datetime :created_at t.index [ :key ], unique: true end @@ -17,7 +17,7 @@ class ActiveStorageCreateTables < ActiveRecord::Migration[5.1] t.string :record_gid t.integer :blob_id - t.time :created_at + t.datetime :created_at t.index :record_gid t.index :blob_id |