Sha256: 3eed67b8603ed1518eaeb3551704c39036a90217a17e3a02c3ff5b90c1624ed7

Contents?: true

Size: 564 Bytes

Versions: 1

Compression:

Stored size: 564 Bytes

Contents

class CreateTables < ActiveRecord::Migration
  def self.up
    [:users, :admins, :accounts].each do |table|
      create_table table do |t|
        t.authenticatable :null => table == :admins

        if table != :admin
          t.string :username
          t.confirmable
          t.recoverable
          t.rememberable
          t.trackable
          t.lockable
          t.token_authenticatable
        end

        t.timestamps
      end
    end
  end

  def self.down
    [:users, :admins, :accounts].each do |table|
      drop_table table
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
devise-1.1.rc0 test/rails_app/db/migrate/20100401102949_create_tables.rb