Sha256: 4f4ec89bb6f4863f20bd110b3c65fb5a989b5af4fb05a9ce218bf49408cd7939

Contents?: true

Size: 1.04 KB

Versions: 30

Compression:

Stored size: 1.04 KB

Contents

class CreateUsers < ActiveRecord::Migration[5.1]
  def change
    create_table :users, force: true do |t|
      t.string :ldap_uid, null: false
      t.string :employee_id, null: true
      t.string :affiliate_id, null: true
      t.string :student_id, null: true
      t.boolean :superuser_flag, null: false, default: false
      t.boolean :inactive_flag, null: false, default: false
      t.string :first_name, null: true
      t.string :last_name, null: true
      t.string :email, null: true
      t.string :alternate_first_name, null: true
      t.string :alternate_last_name, null: true
      t.string :alternate_email, null: true
      t.boolean :alternate_flag, null: false, default: false
      t.datetime :last_login_at, null: true
      t.timestamps
    end

    add_index :users, :ldap_uid, unique: true
    add_index :users, :employee_id, unique: true
    add_index :users, :affiliate_id, unique: true
    add_index :users, :student_id, unique: true
    add_index :users, :first_name
    add_index :users, :last_name
    add_index :users, :email
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
ucb_rails_user-7.0.0 lib/templates/db/create_users.rb
ucb_rails_user-6.2.2 lib/templates/db/create_users.rb
ucb_rails_user-6.2.0 lib/templates/db/create_users.rb
ucb_rails_user-6.1.1 lib/templates/db/create_users.rb
ucb_rails_user-6.1.0 lib/templates/db/create_users.rb
ucb_rails_user-6.0.0 lib/templates/db/create_users.rb
ucb_rails_user-5.0.0 db/migrate/20170324221936_create_users.rb
ucb_rails_user-4.1.2 db/migrate/20170324221936_create_users.rb
ucb_rails_user-4.1.1 db/migrate/20170324221936_create_users.rb
ucb_rails_user-4.1.0 db/migrate/20170324221936_create_users.rb
ucb_rails_user-4.0.7 db/migrate/20170324221936_create_users.rb
ucb_rails_user-4.0.6 db/migrate/20170324221936_create_users.rb
ucb_rails_user-4.0.5 db/migrate/20170324221936_create_users.rb
ucb_rails_user-4.0.4 db/migrate/20170324221936_create_users.rb
ucb_rails_user-4.0.3 db/migrate/20170324221936_create_users.rb
ucb_rails_user-4.0.2 db/migrate/20170324221936_create_users.rb
ucb_rails_user-4.0.1 db/migrate/20170324221936_create_users.rb
ucb_rails_user-4.0.0 db/migrate/20170324221936_create_users.rb
ucb_rails_user-3.0.2 db/migrate/20170324221936_create_users.rb
ucb_rails_user-4.0.0.beta1 db/migrate/20170324221936_create_users.rb