szoe-pontok/init.sql

17 lines
601 B
MySQL
Raw Permalink Normal View History

2024-10-10 18:22:03 +00:00
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
)