Sha256: c90d56b2246016a6f8c182ae5530b0537d241afbd1d896e801bcdb0a898edc69

Contents?: true

Size: 671 Bytes

Versions: 3

Compression:

Stored size: 671 Bytes

Contents

class ModifyUser < ActiveRecord::Migration[6.0]
  def change
    remove_column :users, :name, :string
    remove_column :users, :nickname, :string
    add_column :users, :first_name, :string
    add_column :users, :middle_name, :string
    add_column :users, :last_name, :string
    add_column :users, :gender, :string
    add_column :users, :date_of_birth, :date
    change_column :users, :first_name, :string, null: false
    change_column :users, :middle_name, :string, null: false
    change_column :users, :last_name, :string, null: false
    change_column :users, :gender, :string, null: false
    change_column :users, :date_of_birth, :date, null: false
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sis_core-1.0.5 db/migrate/20200319074334_modify_user.rb
sis_core-1.0.4 db/migrate/20200319074334_modify_user.rb
sis_core-1.0.3 db/migrate/20200319074334_modify_user.rb