From 29d65e90802bd93e8d36d4c67569bed0b013cb99 Mon Sep 17 00:00:00 2001 From: George Claghorn Date: Fri, 7 Jul 2017 19:16:41 -0400 Subject: Change type of created_at columns from time to datetime We intend to store a date and time, not merely a time. --- lib/active_storage/migration.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3