First swagger version, added auto-migrate on startup

This commit is contained in:
2026-03-15 20:40:41 +05:00
parent fb0269f804
commit b38f9cf8fd
18 changed files with 984 additions and 30 deletions

View 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