class CreateAvatars

Generated by Authkit.

Create an avatars table for managing user profile images

Public Class Methods

down() click to toggle source
# File lib/generators/authkit/templates/db/migrate/create_avatars.rb, line 25
def self.down
  drop_table :avatars
end
up() click to toggle source
# File lib/generators/authkit/templates/db/migrate/create_avatars.rb, line 6
def self.up
  create_table :avatars do |t|
    t.integer  :user_id
    t.integer  :top, default: 0
    t.integer  :left, default: 0
    t.integer  :width, default: 0
    t.integer  :height, default: 0
    t.text     :remote_url
    t.string   :attachment_file_name
    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 null: false
  end
end