Skip to content

Instantly share code, notes, and snippets.

@rodloboz
Created April 27, 2019 02:42
Show Gist options
  • Save rodloboz/6265116eb36fefb8df0abf590aff78cc to your computer and use it in GitHub Desktop.
Save rodloboz/6265116eb36fefb8df0abf590aff78cc to your computer and use it in GitHub Desktop.
class AddAttributesToUsers < ActiveRecord::Migration[6.0]
def change
add_column :users, :full_name, :string
add_column :users, :username, :string
add_index :users, :username, unique: true
add_column :users, :about, :text
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment