Sha256: 29fb3590e63b3ed01aeea41900f20068c77daad1186484f2d84f929cf67d9fe1

Contents?: true

Size: 428 Bytes

Versions: 1

Compression:

Stored size: 428 Bytes

Contents

class CreateUsers < ActiveRecord::Migration
  class User < ActiveRecord::Base; end

  def self.up
    create_table :users do |t|
      t.string   :account
      t.string   :name
      t.string   :hashed_password
      t.string   :salt
      t.timestamps
    end
    add_index :users, :account, :unique => true

    User.create(:account => 'test', :name => 'Built-in User')
  end

  def self.down
    drop_table :users
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ava_rails_generator-0.0.3 templates/002_create_users.rb