Sha256: 62df355317756dd8a6755ea16e8c22115521a370c2deba9c36bacd92a5f50482

Contents?: true

Size: 1.62 KB

Versions: 3

Compression:

Stored size: 1.62 KB

Contents

class CreateAccounts < ActiveRecord::Migration
  def self.up
    create_table "accounts", :force => true do |t|
      t.column :login,                     :string, :limit => 40
      t.column :first_name,                :string, :limit => 100, :default => '', :null => true
      t.column :last_name,                 :string, :limit => 100, :default => '', :null => true
      t.column :email,                     :string, :limit => 100
      t.column :crypted_password,          :string, :limit => 40
      t.column :salt,                      :string, :limit => 40
      t.column :created_at,                :datetime
      t.column :updated_at,                :datetime
      t.column :remember_token,            :string, :limit => 40
      t.column :remember_token_expires_at, :datetime
      t.column :activation_code,           :string, :limit => 40
      t.column :activated_at,              :datetime
      t.column :state,                     :string, :null => :no, :default => 'passive'
      t.column :deleted_at,                :datetime

      # For attachment_fu
      # t.column :parent_id,  :integer
      # t.column :content_type, :string
      # t.column :filename, :string    
      # t.column :thumbnail, :string 
      # t.column :size, :integer
      # t.column :width, :integer
      # t.column :height, :integer
      
      # For paperclip
      t.column :avatar_file_name, :string
      t.column :avatar_content_type, :string
      t.column :avatar_file_size, :integer
      t.column :avatar_updated_at, :datetime
    end
    add_index :accounts, :login, :unique => true
  end

  def self.down
    drop_table "accounts"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
emergent-core-0.1.0 rails_generators/emergent_config/templates/db/migrate/create_accounts.rb
emergent-core-0.1.02 rails_generators/emergent_config/templates/db/migrate/create_accounts.rb
emergent-core-0.1.01 rails_generators/emergent_config/templates/db/migrate/create_accounts.rb