Added Login

This commit is contained in:
2025-02-17 03:38:48 +01:00
parent af5248faed
commit 90ccb8a00c
20 changed files with 519 additions and 20 deletions
@@ -0,0 +1,7 @@
create table roles (id bigint generated by default as identity, name varchar(255) not null, primary key (id));
create table users (id bigint generated by default as identity, name varchar(255) not null, password varchar(255) not null, primary key (id));
create table users_roles (user_id bigint not null, role_id bigint not null);
alter table if exists roles drop constraint if exists UKofx66keruapi6vyqpv6f2or37;
alter table if exists roles add constraint UKofx66keruapi6vyqpv6f2or37 unique (name);
alter table if exists users_roles add constraint FKj6m8fwv7oqv74fcehir1a9ffy foreign key (role_id) references roles;
alter table if exists users_roles add constraint FK2o0jvgh89lemvvo17cbqvdxaa foreign key (user_id) references users;