@kontrolia/db 2.1.1 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,20 @@
1
+ -- Lets an application's own row remember which GoTrue OAuth 2.1 client it
2
+ -- registered, so admin-panel can manage OAuth-client credentials from
3
+ -- inside that application's row instead of a separate, disconnected
4
+ -- top-level "Clientes OAuth" screen. No real FK is possible — GoTrue's
5
+ -- OAuth clients live entirely outside this schema, reachable only via its
6
+ -- own admin HTTP API (see apps/auth-server/app/api/oauth-clients/route.ts),
7
+ -- not a Postgres table this database has any relationship to. This is
8
+ -- purely a pointer, populated by the application layer after a successful
9
+ -- POST to that route.
10
+ --
11
+ -- An old day-one migration comment (0003_applications_and_permissions.sql:
12
+ -- "oauth_clients (v2) attach real OAuth2 credentials to a row here") shows
13
+ -- this link was the original intended design; it was never implemented and
14
+ -- the two concepts drifted apart into fully separate admin-panel pages.
15
+ -- This finally closes that gap.
16
+
17
+ alter table kontrolia_auth.applications add column oauth_client_id text;
18
+
19
+ comment on column kontrolia_auth.applications.oauth_client_id is
20
+ 'GoTrue OAuth 2.1 client_id registered for this application, if any — set by admin-panel after POST /api/oauth-clients succeeds. Not a foreign key: GoTrue''s own oauth_clients table lives outside kontrolia_auth, reachable only via its admin API.';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontrolia/db",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "license": "MIT",
5
5
  "description": "KontrolIA Auth database layer: SQL migrations for the `kontrolia` schema (organizations, RBAC, Custom Access Token Hook) and a connection-string-agnostic migration runner.",
6
6
  "keywords": [