Add WorkItem model for Problem sheets and equivalent
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
class CreateWorkItems < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
create_table :work_items do |t|
|
||||
t.string :title, null: false
|
||||
t.references :course, null: false, foreign_key: true
|
||||
t.datetime :due_date, null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Generated
+11
-1
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.1].define(version: 2023_10_06_210710) do
|
||||
ActiveRecord::Schema[7.1].define(version: 2023_10_07_144031) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
||||
@@ -60,6 +60,16 @@ ActiveRecord::Schema[7.1].define(version: 2023_10_06_210710) do
|
||||
t.index ["lecture_id"], name: "index_tracked_time_entries_on_lecture_id"
|
||||
end
|
||||
|
||||
create_table "work_items", force: :cascade do |t|
|
||||
t.string "title", null: false
|
||||
t.bigint "course_id", null: false
|
||||
t.datetime "due_date", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["course_id"], name: "index_work_items_on_course_id"
|
||||
end
|
||||
|
||||
add_foreign_key "recordings", "courses"
|
||||
add_foreign_key "tracked_time_entries", "lectures"
|
||||
add_foreign_key "work_items", "courses"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user