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.10.4 lib/canvas_sync/generators/templates/migrations/create_assignments.rb
canvas_sync-0.10.3 lib/canvas_sync/generators/templates/migrations/create_assignments.rb