mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-13 01:10:39 -07:00
testing scheduling
This commit is contained in:
parent
a0646ba70f
commit
0cdf38fcc0
10 changed files with 163 additions and 1 deletions
13
db/migrate/20170307152229_create_recipient_schedules.rb
Normal file
13
db/migrate/20170307152229_create_recipient_schedules.rb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
class CreateRecipientSchedules < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :recipient_schedules do |t|
|
||||
t.integer :recipient_id
|
||||
t.integer :schedule_id
|
||||
t.text :upcoming_question_ids
|
||||
t.text :attempted_question_ids
|
||||
t.timestamp :last_attempt_at
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
17
db/migrate/20170307153205_create_attempts.rb
Normal file
17
db/migrate/20170307153205_create_attempts.rb
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
class CreateAttempts < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :attempts do |t|
|
||||
t.integer :recipient_id
|
||||
t.integer :schedule_id
|
||||
t.integer :recipient_schedule_id
|
||||
t.timestamp :sent_at
|
||||
t.timestamp :responded_at
|
||||
t.integer :question_id
|
||||
t.integer :translation_id
|
||||
t.integer :answer_index
|
||||
t.integer :open_response_id
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
26
db/schema.rb
26
db/schema.rb
|
|
@ -10,11 +10,25 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20170306145359) do
|
||||
ActiveRecord::Schema.define(version: 20170307153205) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
||||
create_table "attempts", force: :cascade do |t|
|
||||
t.integer "recipient_id"
|
||||
t.integer "schedule_id"
|
||||
t.integer "recipient_schedule_id"
|
||||
t.datetime "sent_at"
|
||||
t.datetime "responded_at"
|
||||
t.integer "question_id"
|
||||
t.integer "translation_id"
|
||||
t.integer "answer_index"
|
||||
t.integer "open_response_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "categories", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "blurb"
|
||||
|
|
@ -62,6 +76,16 @@ ActiveRecord::Schema.define(version: 20170306145359) do
|
|||
t.index ["school_id"], name: "index_recipient_lists_on_school_id", using: :btree
|
||||
end
|
||||
|
||||
create_table "recipient_schedules", force: :cascade do |t|
|
||||
t.integer "recipient_id"
|
||||
t.integer "schedule_id"
|
||||
t.text "upcoming_question_ids"
|
||||
t.text "attempted_question_ids"
|
||||
t.datetime "last_attempt_at"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "recipients", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "phone"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue