Class: CreateSections
- Inherits:
-
Object
- Object
- CreateSections
- Defined in:
- lib/canvas_sync/generators/templates/migrations/create_sections.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 20 |
# File 'lib/canvas_sync/generators/templates/migrations/create_sections.rb', line 4 def change create_table :sections do |t| t.bigint :canvas_id, null: false t.string :sis_id t.bigint :canvas_course_id t.bigint :canvas_nonxlist_course_id t.string :name t.string :workflow_state t.datetime :start_at t.datetime :end_at t. end add_index :sections, :canvas_id, unique: true add_index :sections, :canvas_course_id end |