Class: CreateAccounts

Inherits:
Object
  • Object
show all
Defined in:
lib/canvas_sync/generators/templates/migrations/create_accounts.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
# File 'lib/canvas_sync/generators/templates/migrations/create_accounts.rb', line 4

def change
  create_table :accounts do |t|
    t.bigint :canvas_id, null: false
    t.string :sis_id
    t.bigint :canvas_parent_account_id
    t.string :sis_parent_account_id
    t.string :name
    t.string :workflow_state

    t.timestamps
  end
  add_index :accounts, :canvas_id, unique: true
end