Class: CreateGradingPeriods

Inherits:
Object
  • Object
show all
Defined in:
lib/canvas_sync/generators/templates/migrations/create_grading_periods.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
# File 'lib/canvas_sync/generators/templates/migrations/create_grading_periods.rb', line 4

def change
  create_table :grading_periods do |t|
    t.bigint :canvas_id, null: false
    t.string :title
    t.float :weight
    t.datetime :start_date
    t.datetime :end_date
    t.datetime :close_date
    t.bigint :canvas_grading_period_group_id

    t.string :workflow_state

    t.timestamps
  end

  add_index :grading_periods, :canvas_id, unique: true
  add_index :grading_periods, :canvas_grading_period_group_id
end