go-project-template/db/migrations/001_init.sql
Finn 4ebe6c7752 add auth
and some other improvements
2024-07-24 22:13:23 -07:00

13 lines
330 B
SQL

-- +goose Up
-- +goose StatementBegin
CREATE TABLE users (
id SERIAL PRIMARY KEY,
idp_sub VARCHAR(36) UNIQUE NOT NULL, -- is this long enough for other IDPs? Keycloak gives a UUID
username VARCHAR(50) NOT NULL
);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE users;
-- +goose StatementEnd