lib/canvas_sync/generators/templates/migrations/create_content_migrations.rb



# <%= autogenerated_migration_warning %>

class CreateContentMigrations < ActiveRecord::Migration[5.1]
  def change
    create_table :content_migrations do |t|
      t.bigint :canvas_id
      t.bigint :canvas_context_id
      t.string :canvas_context_type
      t.string :workflow_state
      t.text :migration_settings
      t.datetime :started_at
      t.datetime :finished_at
      t.float :progress
      t.bigint :canvas_source_course_id
      t.string :migration_type
      t.bigint :canvas_child_subscription_id
      t.bigint :canvas_root_account_id

      t.timestamps
    end

    add_index :content_migrations, :canvas_id, unique: true
  end
end