feat(store): add users and org memberships with single owner per org
Refs #1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
c615c21af1
commit
95da376ac1
9 files changed
+356
No files matched your search
@@ -2,5 +2,14 @@
|
||||
INSERT INTO orgs (slug, name) VALUES ($1, $2)
|
||||
RETURNING *;
|
||||
|
||||
-- name: GetOrg :one
|
||||
SELECT * FROM orgs WHERE id = $1;
|
||||
|
||||
-- name: GetOrgBySlug :one
|
||||
SELECT * FROM orgs WHERE slug = $1;
|
||||
|
||||
-- name: ListOrgs :many
|
||||
SELECT * FROM orgs ORDER BY name;
|
||||
|
||||
-- name: DeleteOrg :execrows
|
||||
DELETE FROM orgs WHERE id = $1;
|
||||
Reference in new issue
Block a user