Class: CreateContextModules
- Inherits:
-
Object
- Object
- CreateContextModules
- Defined in:
- lib/canvas_sync/generators/templates/migrations/create_context_modules.rb
Overview
<%= autogenerated_migration_warning %>
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
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_modules.rb', line 4 def change create_table :context_modules do |t| t.bigint :canvas_id t.bigint :canvas_context_id t.string :canvas_context_type t.integer :position t.string :name t.string :workflow_state t.datetime :deleted_at t.datetime :unlock_at t. end add_index :context_modules, :canvas_id, unique: true add_index :context_modules, [:canvas_context_id, :canvas_context_type], name: "index_context_modules_on_context" end |