Skip to content

Add users and role/permission migrations - #5

Merged
mtiluk merged 1 commit into
mainfrom
users-roles
Sep 30, 2026
Merged

mtiluk merged 1 commit into
mainfrom
users-roles

Conversation

@mtiluk

@mtiluk mtiluk commented Sep 30, 2026

Copy link
Copy Markdown
Owner
  • Replace the empty 00001_init.sql with 00001_users.sql: UUID ids, given_name/family_name, password_hash, case-insensitive unique email
  • 00002_roles_permissions.sql adds roles, permissions, role_permissions and user_roles with integer identity ids and cascading foreign keys

Existing databases that applied 00001_init.sql need its goose record removed first: DELETE FROM goose_db_version WHERE version_id = 1

- Replace the empty 00001_init.sql with 00001_users.sql: UUID ids,
  given_name/family_name, password_hash, case-insensitive unique email
- 00002_roles_permissions.sql adds roles, permissions, role_permissions
  and user_roles with integer identity ids and cascading foreign keys

Existing databases that applied 00001_init.sql need its goose record
removed first: DELETE FROM goose_db_version WHERE version_id = 1
@mtiluk
mtiluk merged commit 874613c into main Sep 30, 2026
2 checks passed
@mtiluk
mtiluk deleted the users-roles branch September 30, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant