lib/generators/authkit/templates/db/migrate/create_avatars.rb in authkit-0.5.0 vs lib/generators/authkit/templates/db/migrate/create_avatars.rb in authkit-0.7.0
- old
+ new
@@ -1,10 +1,10 @@
# Generated by Authkit.
#
# Create an avatars table for managing user profile images
#
-class CreateAvatars < ActiveRecord::Migration
+class CreateAvatars < ActiveRecord::Migration[5.0]
def self.up
create_table :avatars do |t|
t.integer :user_id
t.integer :top, default: 0
t.integer :left, default: 0
@@ -15,10 +15,11 @@
t.string :attachment_content_type
t.integer :attachment_file_size
t.datetime :attachment_updated_at
t.boolean :attachment_importing, default: false
t.datetime :attachment_uploaded_at
- t.timestamps
+
+ t.timestamps null: false
end
end
def self.down
drop_table :avatars