lib/canvas_sync/generators/templates/migrations/create_accounts.rb



# <%= autogenerated_migration_warning %>

class CreateAccounts < ActiveRecord::Migration[5.1]
  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
end