Rephrase toggl scraping in term of attendances
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
class CreateAttendances < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
create_table :attendances do |t|
|
||||
t.references :lecture, null: false, foreign_key: true
|
||||
t.string :associated_toggl_entry
|
||||
t.integer :kind
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class RemoveTogglEntryIdFromLecture < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
remove_column :lectures, :associated_toggl_entry
|
||||
end
|
||||
end
|
||||
Generated
+11
-2
@@ -10,10 +10,19 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.0].define(version: 2023_09_29_200245) do
|
||||
ActiveRecord::Schema[7.0].define(version: 2023_09_29_201903) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
||||
create_table "attendances", force: :cascade do |t|
|
||||
t.bigint "lecture_id", null: false
|
||||
t.string "associated_toggl_entry"
|
||||
t.integer "kind"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["lecture_id"], name: "index_attendances_on_lecture_id"
|
||||
end
|
||||
|
||||
create_table "courses", force: :cascade do |t|
|
||||
t.string "title"
|
||||
t.string "unit_code"
|
||||
@@ -31,9 +40,9 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_29_200245) do
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.bigint "course_id"
|
||||
t.string "associated_toggl_entry"
|
||||
t.index ["course_id"], name: "index_lectures_on_course_id"
|
||||
t.index ["recording_id"], name: "index_lectures_on_recording_id", unique: true
|
||||
end
|
||||
|
||||
add_foreign_key "attendances", "lectures"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user