Sha256: 094b6a32a660913c52ce039f26fef9618e190f8654c39eee1b99ac01685f2335

Contents?: true

Size: 752 Bytes

Versions: 4

Compression:

Stored size: 752 Bytes

Contents

class AddFielsToUser < ActiveRecord::Migration
  def change
    add_column :users, :firstname, :string
    add_column :users, :lastname, :string
    add_column :users, :is_gadz, :boolean
    add_column :users, :uuid, :string
    add_column :users, :last_gram_sync_at, :datetime
    add_column :users, :hruid, :string, null: false, default: ""


    add_index :users, :uuid,                unique: true
    add_index :users, :hruid,                unique: true
    add_index :users, :is_gadz

  end

  def self.up
    change_column :users, :hruid, :string, :null => false
    remove_index :users, :email
  end

  def self.down
    change_column :users, :email, :string, :null => false
    add_index :users, :email,                unique: true
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gorg_engine-1.2.4 db/migrate/20170320183954_add_fiels_to_user.rb
gorg_engine-1.2.3 db/migrate/20170320183954_add_fiels_to_user.rb
gorg_engine-1.2.0 db/migrate/20170320183954_add_fiels_to_user.rb
gorg_engine-1.1.0 db/migrate/20170320183954_add_fiels_to_user.rb