Class: CreateContextModuleItems

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

def change
  create_table :context_module_items do |t|
    t.bigint :canvas_id
    t.bigint :canvas_context_module_id
    t.integer :position
    t.bigint :canvas_content_id
    t.string :canvas_content_type
    t.bigint :canvas_assignment_id
    t.string :workflow_state

    t.timestamps
  end

  add_index :context_module_items, :canvas_id, unique: true
  add_index :context_module_items, :canvas_context_module_id
end