Sha256: b3a7165d000c65d6e22c363a1b40fa78d613fcdb89311586781f50ff5311c73a

Contents?: true

Size: 1.57 KB

Versions: 28

Compression:

Stored size: 1.57 KB

Contents

# <%= autogenerated_migration_warning %>

class CreateLearningOutcomeResults < ActiveRecord::Migration[5.1]
  def change
    create_table :learning_outcome_results do |t|
      t.bigint :canvas_id, null: false
      t.bigint :canvas_context_id
      t.string :canvas_context_type
      t.bigint :canvas_association_id
      t.string :canvas_association_type
      t.bigint :canvas_content_tag_id
      t.bigint :canvas_learning_outcome_id
      t.bigint :canvas_user_id
      t.boolean :mastery
      t.boolean :original_mastery
      t.bigint :canvas_artifact_id
      t.string :canvas_artifact_type
      t.datetime :assessed_at
      t.string :title
      t.float :percent
      t.bigint :canvas_associated_asset_id
      t.string :canvas_associated_asset_type
      t.integer :attempt
      t.float :score
      t.float :possible
      t.float :original_score
      t.float :original_possible
      t.string :workflow_state

      t.timestamps
    end

    add_index :learning_outcome_results, :canvas_id, unique: true
    add_index :learning_outcome_results, %i[
      canvas_user_id
      canvas_content_tag_id
      canvas_association_id
      canvas_association_type
      canvas_associated_asset_id
      canvas_associated_asset_type
    ], unique: true, name: :index_learning_outcome_results_association
    add_index :learning_outcome_results, :canvas_content_tag_id
    add_index :learning_outcome_results, :canvas_learning_outcome_id
    add_index :learning_outcome_results, %i[canvas_artifact_id canvas_artifact_type], name: :index_learning_outcome_results_on_canvas_arid_and_artype
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
canvas_sync-0.22.9 lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb
canvas_sync-0.22.8 lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb
canvas_sync-0.22.6 lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb
canvas_sync-0.22.5 lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb
canvas_sync-0.22.4 lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb
canvas_sync-0.22.3 lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb
canvas_sync-0.22.2 lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb
canvas_sync-0.22.1 lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb
canvas_sync-0.22.0 lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb
canvas_sync-0.22.0.beta8 lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb
canvas_sync-0.22.0.beta7 lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb
canvas_sync-0.22.0.beta6 lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb
canvas_sync-0.22.0.beta5 lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb
canvas_sync-0.22.0.beta4 lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb
canvas_sync-0.22.0.beta3 lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb
canvas_sync-0.22.0.beta2 lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb
canvas_sync-0.22.0.beta1 lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb
canvas_sync-0.21.1 lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb
canvas_sync-0.21.1.beta1 lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb
canvas_sync-0.21.0 lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb