Changed... something, I can't remember
This commit is contained in:
@@ -2,7 +2,7 @@ BEGIN;
|
||||
|
||||
CREATE TYPE master_spec AS ENUM ('работа1', 'работа2', 'и тд');
|
||||
|
||||
CREATE TABLE "user" (
|
||||
CREATE TABLE client (
|
||||
id UUID PRIMARY KEY,
|
||||
surname TEXT NOT NULL,
|
||||
Name TEXT NOT NULL,
|
||||
@@ -45,7 +45,7 @@ CREATE TABLE part (
|
||||
|
||||
CREATE TABLE vehicle (
|
||||
id UUID PRIMARY KEY,
|
||||
owner_id UUID NOT NULL REFERENCES "user" (id) ON DELETE CASCADE,
|
||||
owner_id UUID NOT NULL REFERENCES client (id) ON DELETE CASCADE,
|
||||
gos_num TEXT NOT NULL,
|
||||
mark TEXT,
|
||||
model TEXT,
|
||||
@@ -79,13 +79,13 @@ CREATE TABLE receipt (
|
||||
|
||||
CREATE TABLE service_cart (
|
||||
id UUID PRIMARY KEY,
|
||||
user_id UUID NOT NULL REFERENCES "user" (id) ON DELETE CASCADE,
|
||||
user_id UUID NOT NULL REFERENCES client (id) ON DELETE CASCADE,
|
||||
service_id UUID NOT NULL REFERENCES service (id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE TABLE part_cart (
|
||||
id UUID PRIMARY KEY,
|
||||
user_id UUID NOT NULL REFERENCES "user" (id) ON DELETE CASCADE,
|
||||
user_id UUID NOT NULL REFERENCES client (id) ON DELETE CASCADE,
|
||||
part_id UUID NOT NULL REFERENCES part (id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user