First swagger version, added auto-migrate on startup
This commit is contained in:
13
migrations/20260304163423_create_users_roles.sql
Normal file
13
migrations/20260304163423_create_users_roles.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- +goose Up
|
||||
-- +goose StatementBegin
|
||||
CREATE TABLE IF NOT EXISTS user_roles(
|
||||
user_id UUID REFERENCES users(id) ON DELETE CASCADE,
|
||||
role_id UUID REFERENCES roles(id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (user_id, role_id)
|
||||
);
|
||||
-- +goose StatementEnd
|
||||
|
||||
-- +goose Down
|
||||
-- +goose StatementBegin
|
||||
DROP TABLE IF EXISTS user_roles;
|
||||
-- +goose StatementEnd
|
||||
Reference in New Issue
Block a user