Class: CreateCourseProgresses
- Inherits:
-
Object
- Object
- CreateCourseProgresses
- Defined in:
- lib/canvas_sync/generators/templates/migrations/create_course_progresses.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 |
# File 'lib/canvas_sync/generators/templates/migrations/create_course_progresses.rb', line 4 def change create_table :course_progresses do |t| t.bigint :canvas_course_id, null: false t.bigint :canvas_user_id, null: false t.integer :requirement_count t.integer :requirement_completed_count t.datetime :completion_date t. end add_index :course_progresses, :canvas_user_id add_index :course_progresses, :canvas_course_id add_index :course_progresses, [:canvas_user_id, :canvas_course_id], unique: true end |