Class: CreateRoles

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

def change
  create_table :roles do |t|
    t.integer :canvas_id, null: false
    t.string :label
    t.string :base_role_type
    t.integer :canvas_account_id
    t.string :workflow_state
    t.json :permissions

    t.timestamps
  end
  add_index :roles, :canvas_id, unique: true
  add_index :roles, :canvas_account_id
end