szoe-pontok/init.sql
2024-10-10 20:22:03 +02:00

17 lines
601 B
SQL

create table if not exists "user" (
"id" serial primary key,
"neptun" char(6) not null unique,
"email" varchar(320) not null unique,
"password" varchar(72) not null unique
);
create table if not exists "task" (
"id" serial primary key,
"description" text,
"points" integer not null,
"recipient" integer not null references "user"("id") on delete cascade,
"issuer" integer not null references "user"("id"),
"created_date" timestamp with time zone default current_timestamp
);
create table if not exists "admin" (
"user" integer not null references "user"("id") on delete cascade
)