Удалил в2

This commit is contained in:
dipatrik10
2026-04-09 21:20:11 +03:00
parent e92aa74048
commit 813e81be70

View File

@@ -1,41 +0,0 @@
-- ==========================================
-- Редактирование учебных групп
-- ==========================================
ALTER TABLE student_groups
ADD COLUMN IF NOT EXISTS specialty_code INT REFERENCES specialties(id),
ADD COLUMN IF NOT EXISTS year_start_study INT,
DROP COLUMN IF EXISTS course;
UPDATE student_groups
SET specialty_code = 1
WHERE specialty_code IS NULL;
UPDATE student_groups
SET year_start_study = 2023
WHERE year_start_study IS NULL;
ALTER TABLE student_groups
ALTER COLUMN specialty_code SET NOT NULL;
ALTER TABLE student_groups
ALTER COLUMN year_start_study SET NOT NULL;
-- ==========================================
-- Редактирование кафедрального файла
-- ==========================================
ALTER TABLE schedule_data
DROP COLUMN IF EXISTS semester;
INSERT INTO schedule_data (department_id, group_id, subjects_id, lesson_type_id, number_of_hours, is_division, teacher_id, semester_type, period)
VALUES (1, 1, 1, 3, 2, true, 1, 'autumn', '2024-2025'),
(2, 2, 3, 2, 1, false, 2, 'spring', '2025-2026'),
(3, 1, 2, 1, 3, true, 1, 'autumn', '2023-2024'),
(2, 2, 3, 2, 1, false, 2, 'spring', '2025-2026'),
(2, 2, 3, 2, 1, false, 2, 'spring', '2025-2026'),
(2, 2, 3, 2, 1, false, 2, 'spring', '2025-2026'),
(1, 1, 1, 1, 2, true, 2, 'autumn', '2024-2025'),
(1, 2, 2, 3, 4, false, 2, 'autumn', '2024-2025'),
(1, 1, 4, 2, 1, false, 1, 'autumn', '2024-2025'),
(1, 2, 5, 1, 7, true, 1, 'autumn', '2024-2025');