Class: CreateContentMigrations

Inherits:
Object
  • Object
show all
Defined in:
lib/canvas_sync/generators/templates/migrations/create_content_migrations.rb

Overview

<%= autogenerated_migration_warning %>

Instance Method Summary collapse

Instance Method Details

#changeObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/canvas_sync/generators/templates/migrations/create_content_migrations.rb', line 4

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