2024-10-05 22:02:08 +04:00
|
|
|
CREATE TABLE IF NOT EXISTS university (
|
2024-10-05 23:40:53 +04:00
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
name VARCHAR(100) NOT NULL,
|
|
|
|
established_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS faculty (
|
2024-10-05 22:02:08 +04:00
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
name VARCHAR(100) NOT NULL
|
2024-10-05 23:40:53 +04:00
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS faculty_university (
|
|
|
|
faculty_id INT REFERENCES faculty(id),
|
|
|
|
university_id INT REFERENCES university(id),
|
|
|
|
PRIMARY KEY (faculty_id, university_id)
|
|
|
|
);
|