feat(invitations): accept invitations with C4 consent and contact grants; share the E0 quota across holdings
This commit is contained in:
1 parent
a5990d3fc6
commit
676b3c6e24
59 files changed
+4926
-194
No files matched your search
@@ -0,0 +1,20 @@
|
||||
-- Stores the holding of a founder account unless the account already has one.
|
||||
-- A concurrent creation of the same account waits on the founder key until the
|
||||
-- other transaction ends; then this insert does nothing, and the caller reads
|
||||
-- the stored holding with GetHoldingIDByFounder.
|
||||
-- name: InsertHoldingIfAbsent :exec
|
||||
INSERT INTO holdings (
|
||||
id,
|
||||
founder_account_id,
|
||||
created_at
|
||||
) VALUES (
|
||||
sqlc.arg(id),
|
||||
sqlc.arg(founder_account_id),
|
||||
sqlc.arg(created_at)
|
||||
)
|
||||
ON CONFLICT (founder_account_id) DO NOTHING;
|
||||
|
||||
-- name: GetHoldingIDByFounder :one
|
||||
SELECT id
|
||||
FROM holdings
|
||||
WHERE founder_account_id = sqlc.arg(founder_account_id);
|
||||
Reference in new issue
Block a user