Stash
This commit is contained in:
@@ -8,5 +8,7 @@ class CreateRecordings < ActiveRecord::Migration[7.0]
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :recordings, :recording_uuid, unique: true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
class AddRecordingIdToLecture < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
remove_column :lectures, :recording_id
|
||||
add_belongs_to :lectures, :recording
|
||||
end
|
||||
end
|
||||
Generated
+4
-3
@@ -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_01_161500) do
|
||||
ActiveRecord::Schema[7.0].define(version: 2023_10_01_163055) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
||||
@@ -36,12 +36,12 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_01_161500) do
|
||||
t.string "title", null: false
|
||||
t.datetime "start_time", null: false
|
||||
t.integer "status", default: 0, null: false
|
||||
t.string "recording_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.bigint "course_id"
|
||||
t.bigint "recording_id"
|
||||
t.index ["course_id"], name: "index_lectures_on_course_id"
|
||||
t.index ["recording_id"], name: "index_lectures_on_recording_id", unique: true
|
||||
t.index ["recording_id"], name: "index_lectures_on_recording_id"
|
||||
end
|
||||
|
||||
create_table "recordings", force: :cascade do |t|
|
||||
@@ -52,6 +52,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_01_161500) do
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["course_id"], name: "index_recordings_on_course_id"
|
||||
t.index ["recording_uuid"], name: "index_recordings_on_recording_uuid", unique: true
|
||||
end
|
||||
|
||||
add_foreign_key "attendances", "lectures"
|
||||
|
||||
Reference in New Issue
Block a user