Track associated toggl entry id for uniqueness, show stats for time spent in different parts of the lecture flow.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
class AddAssociatedTogglEntryId < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
add_column :tracked_time_entries, :associated_toggl_entry_id, :integer, null: false
|
||||
|
||||
# Make column unique
|
||||
add_index :tracked_time_entries, :associated_toggl_entry_id, unique: true
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class MakeAssociatedTogglEntryIdLarger < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
change_column :tracked_time_entries, :associated_toggl_entry_id, :bigint
|
||||
end
|
||||
end
|
||||
Generated
+13
-1
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.0].define(version: 2023_10_02_152546) do
|
||||
ActiveRecord::Schema[7.1].define(version: 2023_10_06_204103) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
||||
@@ -59,6 +59,18 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_02_152546) do
|
||||
t.index ["recording_uuid"], name: "index_recordings_on_recording_uuid", unique: true
|
||||
end
|
||||
|
||||
create_table "tracked_time_entries", force: :cascade do |t|
|
||||
t.bigint "lecture_id", null: false
|
||||
t.integer "kind"
|
||||
t.jsonb "toggl_data"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.bigint "associated_toggl_entry_id", null: false
|
||||
t.index ["associated_toggl_entry_id"], name: "index_tracked_time_entries_on_associated_toggl_entry_id", unique: true
|
||||
t.index ["lecture_id"], name: "index_tracked_time_entries_on_lecture_id"
|
||||
end
|
||||
|
||||
add_foreign_key "attendances", "lectures"
|
||||
add_foreign_key "recordings", "courses"
|
||||
add_foreign_key "tracked_time_entries", "lectures"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user