1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

чиним билд17

This commit is contained in:
MoonTestUse1
2025-01-02 00:55:37 +06:00
parent fa1f027711
commit dc69508f1c
3 changed files with 14 additions and 24 deletions

View File

@@ -2,26 +2,4 @@
\c support_db;
-- Create extensions if needed
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
-- Create tables if they don't exist
CREATE TABLE IF NOT EXISTS employees (
id SERIAL PRIMARY KEY,
first_name VARCHAR NOT NULL,
last_name VARCHAR NOT NULL,
department VARCHAR NOT NULL,
office VARCHAR NOT NULL,
password VARCHAR NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS requests (
id SERIAL PRIMARY KEY,
employee_id INTEGER REFERENCES employees(id),
department VARCHAR NOT NULL,
request_type VARCHAR NOT NULL,
priority VARCHAR NOT NULL,
description TEXT NOT NULL,
status VARCHAR NOT NULL DEFAULT 'new',
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
);
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";