aboutsummaryrefslogtreecommitdiff
path: root/db/migrate/20201005154823_create_users.rb
blob: 2d8403ceab28236d0b0e888b40050c12e69d9644 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class CreateUsers < ActiveRecord::Migration[6.0]
  def change
    create_table :users do |t|
      t.string :name
      t.string :username
      t.string :email
      t.bigint :external_id
      t.string :avatar_url

      t.timestamps
    end
    add_index :users, [:external_id], unique: true
    add_index :users, [:email], unique: true
  end
end