Class: CreateUsers

Inherits:
Object
  • Object
show all
Defined in:
lib/canvas_sync/generators/templates/migrations/create_users.rb

Overview

<%= autogenerated_migration_warning %>

Instance Method Summary collapse

Instance Method Details

#changeObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/canvas_sync/generators/templates/migrations/create_users.rb', line 4

def change
  create_table :users do |t|
    t.bigint :canvas_id, null: false
    t.string :email
    t.string :first_name
    t.string :last_name
    t.string :workflow_state
    t.string :login_id
    t.string :name
    t.string :sortable_name

    t.timestamps
  end

  add_index :users, :canvas_id, unique: true
end