Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save daydream05/e76f5c0d8f9b5ef2510fad573afe2b82 to your computer and use it in GitHub Desktop.
Save daydream05/e76f5c0d8f9b5ef2510fad573afe2b82 to your computer and use it in GitHub Desktop.
class DeviseTokenAuthCreateUsers < ActiveRecord::Migration[5.1]
def change
create_table(:users) do |t|
## Required
######
# Truncated so i can show my example
######
## User Info
t.string :name
t.string :nickname
t.string :image
t.string :email
t.string :phone_number
## Tokens
t.text :tokens
t.timestamps
end
add_index :users, :email, unique: true
add_index :users, [:uid, :provider], unique: true
add_index :users, :reset_password_token, unique: true
add_index :users, :confirmation_token, unique: true
# add_index :users, :unlock_token, unique: true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment