feat: динамические формы обучения + вкладка группы в админке

This commit is contained in:
Zuev
2026-02-15 03:15:43 +03:00
parent 08ed6ebe36
commit 6774cd673c
12 changed files with 782 additions and 85 deletions

View File

@@ -11,3 +11,17 @@ CREATE TABLE IF NOT EXISTS users (
INSERT INTO users (username, password, role)
VALUES ('admin', crypt('admin', gen_salt('bf', 10)), 'ADMIN')
ON CONFLICT (username) DO NOTHING;
CREATE TABLE IF NOT EXISTS education_forms (
id BIGSERIAL PRIMARY KEY,
name VARCHAR(100) UNIQUE NOT NULL
);
INSERT INTO education_forms (name) VALUES ('Бакалавриат'), ('Магистратура'), ('Специалитет')
ON CONFLICT (name) DO NOTHING;
CREATE TABLE IF NOT EXISTS student_groups (
id BIGSERIAL PRIMARY KEY,
name VARCHAR(100) UNIQUE NOT NULL,
education_form_id BIGINT NOT NULL REFERENCES education_forms(id)
);