Sha256: 899a65cf77e4fa52ab34daf4eb875a031d161f7f713bea00445b3508389970bd

Contents?: true

Size: 880 Bytes

Versions: 142

Compression:

Stored size: 880 Bytes

Contents

# <%= autogenerated_migration_warning %>

class CreateAssignments < ActiveRecord::Migration[5.1]
  def change
    create_table :assignments do |t|
      t.bigint :canvas_id, null: false
      t.string :title
      t.text :description
      t.datetime :due_at
      t.datetime :unlock_at
      t.datetime :lock_at
      t.float :points_possible
      t.float :min_score
      t.float :max_score
      t.float :mastery_score
      t.string :grading_type
      t.string :submission_types
      t.string :workflow_state
      t.integer :canvas_context_id
      t.string :canvas_context_type
      t.integer :canvas_assignment_group_id
      t.integer :canvas_grading_scheme_id
      t.integer :canvas_grading_standard_id

      t.timestamps
    end

    add_index :assignments, :canvas_id, unique: true
    add_index :assignments, [:canvas_context_id, :canvas_context_type]
  end
end

Version data entries

142 entries across 142 versions & 1 rubygems

Version Path
canvas_sync-0.19.0.beta1 lib/canvas_sync/generators/templates/migrations/create_assignments.rb
canvas_sync-0.18.12 lib/canvas_sync/generators/templates/migrations/create_assignments.rb
canvas_sync-0.18.10 lib/canvas_sync/generators/templates/migrations/create_assignments.rb
canvas_sync-0.18.9 lib/canvas_sync/generators/templates/migrations/create_assignments.rb
canvas_sync-0.18.8 lib/canvas_sync/generators/templates/migrations/create_assignments.rb
canvas_sync-0.18.7 lib/canvas_sync/generators/templates/migrations/create_assignments.rb
canvas_sync-0.18.6 lib/canvas_sync/generators/templates/migrations/create_assignments.rb
canvas_sync-0.18.5 lib/canvas_sync/generators/templates/migrations/create_assignments.rb
canvas_sync-0.18.3 lib/canvas_sync/generators/templates/migrations/create_assignments.rb
canvas_sync-0.18.2 lib/canvas_sync/generators/templates/migrations/create_assignments.rb
canvas_sync-0.18.1 lib/canvas_sync/generators/templates/migrations/create_assignments.rb
canvas_sync-0.18.0.beta2 lib/canvas_sync/generators/templates/migrations/create_assignments.rb
canvas_sync-0.18.0.beta1 lib/canvas_sync/generators/templates/migrations/create_assignments.rb
canvas_sync-0.17.43 lib/canvas_sync/generators/templates/migrations/create_assignments.rb
canvas_sync-0.17.42 lib/canvas_sync/generators/templates/migrations/create_assignments.rb
canvas_sync-0.17.41 lib/canvas_sync/generators/templates/migrations/create_assignments.rb
canvas_sync-0.17.40 lib/canvas_sync/generators/templates/migrations/create_assignments.rb
canvas_sync-0.17.39 lib/canvas_sync/generators/templates/migrations/create_assignments.rb
canvas_sync-0.17.38 lib/canvas_sync/generators/templates/migrations/create_assignments.rb
canvas_sync-0.17.37 lib/canvas_sync/generators/templates/migrations/create_assignments.rb