Sha256: 2ad31f38822356fd498ae276b3535908afb66782f4b0801865cc24ab182c7286

Contents?: true

Size: 596 Bytes

Versions: 13

Compression:

Stored size: 596 Bytes

Contents

# frozen_string_literal: true

class CreateAvatars < ActiveRecord::Migration[4.2]
  def self.up
    create_table :avatars do |t|
      t.references :user                      # Who uploaded the avatar.
      t.references :entity, polymorphic: true # User, and later on Lead, Contact, or Company
      t.integer :image_file_size              # Uploaded image file size
      t.string :image_file_name               # Uploaded image full file name
      t.string :image_content_type            # MIME content type
      t.timestamps
    end
  end

  def self.down
    drop_table :avatars
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fat_free_crm-0.22.1 db/migrate/20100928030615_create_avatars.rb
fat_free_crm-0.22.0 db/migrate/20100928030615_create_avatars.rb
fat_free_crm-0.21.0 db/migrate/20100928030615_create_avatars.rb
fat_free_crm-0.20.1 db/migrate/20100928030615_create_avatars.rb
fat_free_crm-0.20.0 db/migrate/20100928030615_create_avatars.rb
fat_free_crm-0.19.2 db/migrate/20100928030615_create_avatars.rb
fat_free_crm-0.19.0 db/migrate/20100928030615_create_avatars.rb
fat_free_crm-0.18.2 db/migrate/20100928030615_create_avatars.rb
fat_free_crm-0.17.3 db/migrate/20100928030615_create_avatars.rb
fat_free_crm-0.18.1 db/migrate/20100928030615_create_avatars.rb
fat_free_crm-0.18.0 db/migrate/20100928030615_create_avatars.rb
fat_free_crm-0.17.2 db/migrate/20100928030615_create_avatars.rb
fat_free_crm-0.17.1 db/migrate/20100928030615_create_avatars.rb