Files
member-console/internal/entitlements/queries/pool_assignments.sql
T
cgalo5758 b0072d8971 Consolidate domain tables into core schema
Squash the pre-production migration history into fresh core, fedwiki,
and stripe baselines and reduce the canonical source list to those
three streams.

Update sqlc configs, generated queries, raw SQL, tests, and docs while
keeping provider tables schema-qualified.

BREAKING: existing local database volumes must be wiped because goose
version history restarts from the new baselines.
2026-07-05 20:10:23 -05:00

9 lines
294 B
SQL

-- name: CreatePoolAssignment :one
INSERT INTO core.pool_assignments (pool_id, workspace_id, is_primary)
VALUES ($1, $2, $3)
RETURNING *;
-- name: GetPrimaryPoolAssignmentByWorkspace :one
SELECT * FROM core.pool_assignments
WHERE workspace_id = $1 AND is_primary = TRUE AND status = 'active';