Sha256: 7d02dfb4fd58c82dfa72491c3466ee7f8e23e0aa1739f92893b44c5da6e499f4

Contents?: true

Size: 589 Bytes

Versions: 5

Compression:

Stored size: 589 Bytes

Contents

# <%= autogenerated_migration_warning %>

class CreateCourseProgresses < ActiveRecord::Migration[5.1]
  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.timestamps
    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
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
canvas_sync-0.22.9 lib/canvas_sync/generators/templates/migrations/create_course_progresses.rb
canvas_sync-0.22.8 lib/canvas_sync/generators/templates/migrations/create_course_progresses.rb
canvas_sync-0.22.6 lib/canvas_sync/generators/templates/migrations/create_course_progresses.rb
canvas_sync-0.22.5 lib/canvas_sync/generators/templates/migrations/create_course_progresses.rb
canvas_sync-0.22.4 lib/canvas_sync/generators/templates/migrations/create_course_progresses.rb