# <%= autogenerated_migration_warning %> class CreateRoles < ActiveRecord::Migration[5.1] def change create_table :roles do |t| t.integer :canvas_id, null: false t.string :label, null: false t.string :base_role_type, null: false t.json :account t.integer :canvas_account_id t.string :workflow_state, null: false t.json :permissions t.timestamps end add_index :roles, :canvas_id, unique: true add_index :roles, :canvas_account_id end end