diff options
| author | Paul-Christian Volkmer | 2024-03-01 09:30:07 +0100 |
|---|---|---|
| committer | Paul-Christian Volkmer | 2024-03-01 09:30:07 +0100 |
| commit | 5c15ad4518f70e4523405fa67635c4dff1a73e43 (patch) | |
| tree | dda919da7733b3b63cafc9e71fe1dea0f37f18d3 /src/main/resources/db | |
| parent | 0b6decf88d9084616874d65827e7eb1e8050d1c5 (diff) | |
feat: add user role database table and role-based permissions
Diffstat (limited to 'src/main/resources/db')
| -rw-r--r-- | src/main/resources/db/migration/mariadb/V0_3_0__UserRoles.sql | 7 | ||||
| -rw-r--r-- | src/main/resources/db/migration/postgresql/V0_3_0__UserRoles.sql | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/main/resources/db/migration/mariadb/V0_3_0__UserRoles.sql b/src/main/resources/db/migration/mariadb/V0_3_0__UserRoles.sql new file mode 100644 index 0000000..99399fd --- /dev/null +++ b/src/main/resources/db/migration/mariadb/V0_3_0__UserRoles.sql @@ -0,0 +1,7 @@ +CREATE TABLE IF NOT EXISTS user_role +( + id int auto_increment primary key, + username varchar(255) not null unique, + role varchar(255) not null, + created_at datetime default utc_timestamp() not null +);
\ No newline at end of file diff --git a/src/main/resources/db/migration/postgresql/V0_3_0__UserRoles.sql b/src/main/resources/db/migration/postgresql/V0_3_0__UserRoles.sql new file mode 100644 index 0000000..7dbfc08 --- /dev/null +++ b/src/main/resources/db/migration/postgresql/V0_3_0__UserRoles.sql @@ -0,0 +1,8 @@ +CREATE TABLE IF NOT EXISTS user_role +( + id serial, + username varchar(255) not null unique, + role varchar(255) not null, + created_at timestamp with time zone default now() not null, + PRIMARY KEY (id) +);
\ No newline at end of file |
