@tinyrack/tinyauth-server 0.0.11 → 0.0.13
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.
- package/LICENSE +21 -0
- package/dist/entities/bootstrap-state.entity.d.ts +40 -0
- package/dist/entities/bootstrap-state.entity.d.ts.map +1 -0
- package/dist/entities/bootstrap-state.entity.js +13 -0
- package/dist/entities/bootstrap-state.entity.js.map +1 -0
- package/dist/entrypoints/app.d.ts +3 -1
- package/dist/entrypoints/app.d.ts.map +1 -1
- package/dist/entrypoints/app.js +3 -3
- package/dist/entrypoints/app.js.map +1 -1
- package/dist/entrypoints/database/d1/cli.d.ts +3 -2
- package/dist/entrypoints/database/d1/cli.d.ts.map +1 -1
- package/dist/entrypoints/database/d1/cli.js +9 -2
- package/dist/entrypoints/database/d1/cli.js.map +1 -1
- package/dist/entrypoints/database/d1/compiled-functions.d.ts +185 -160
- package/dist/entrypoints/database/d1/compiled-functions.d.ts.map +1 -1
- package/dist/entrypoints/database/d1/compiled-functions.js +411 -160
- package/dist/entrypoints/database/d1/compiled-functions.js.map +1 -1
- package/dist/entrypoints/database/d1/d1.d.ts.map +1 -1
- package/dist/entrypoints/database/d1/d1.js +11 -15
- package/dist/entrypoints/database/d1/d1.js.map +1 -1
- package/dist/entrypoints/database/postgres/cli.d.ts +3 -2
- package/dist/entrypoints/database/postgres/cli.d.ts.map +1 -1
- package/dist/entrypoints/database/postgres/cli.js +12 -1
- package/dist/entrypoints/database/postgres/cli.js.map +1 -1
- package/dist/entrypoints/database/postgres/compiled-functions.d.ts +185 -160
- package/dist/entrypoints/database/postgres/compiled-functions.d.ts.map +1 -1
- package/dist/entrypoints/database/postgres/compiled-functions.js +411 -160
- package/dist/entrypoints/database/postgres/compiled-functions.js.map +1 -1
- package/dist/entrypoints/database/postgres/postgres.d.ts.map +1 -1
- package/dist/entrypoints/database/postgres/postgres.js +5 -3
- package/dist/entrypoints/database/postgres/postgres.js.map +1 -1
- package/dist/entrypoints/database/sqlite/cli.d.ts +3 -2
- package/dist/entrypoints/database/sqlite/cli.d.ts.map +1 -1
- package/dist/entrypoints/database/sqlite/cli.js +9 -1
- package/dist/entrypoints/database/sqlite/cli.js.map +1 -1
- package/dist/entrypoints/database/sqlite/compiled-functions.d.ts +185 -160
- package/dist/entrypoints/database/sqlite/compiled-functions.d.ts.map +1 -1
- package/dist/entrypoints/database/sqlite/compiled-functions.js +411 -160
- package/dist/entrypoints/database/sqlite/compiled-functions.js.map +1 -1
- package/dist/entrypoints/database/sqlite/sqlite.d.ts.map +1 -1
- package/dist/entrypoints/database/sqlite/sqlite.js +4 -0
- package/dist/entrypoints/database/sqlite/sqlite.js.map +1 -1
- package/dist/entrypoints/services.d.ts +1 -1
- package/dist/entrypoints/services.d.ts.map +1 -1
- package/dist/entrypoints/services.js.map +1 -1
- package/dist/lib/database/entities.d.ts.map +1 -1
- package/dist/lib/database/entities.js +2 -0
- package/dist/lib/database/entities.js.map +1 -1
- package/dist/migrations/d1/Migration20260509172833_initial.d.ts +5 -0
- package/dist/migrations/d1/Migration20260509172833_initial.d.ts.map +1 -0
- package/dist/migrations/d1/Migration20260509172833_initial.js +62 -0
- package/dist/migrations/d1/Migration20260509172833_initial.js.map +1 -0
- package/dist/migrations/d1/index.d.ts +3 -0
- package/dist/migrations/d1/index.d.ts.map +1 -0
- package/dist/migrations/d1/index.js +3 -0
- package/dist/migrations/d1/index.js.map +1 -0
- package/dist/migrations/postgres/Migration20260509171036_initial.d.ts +5 -0
- package/dist/migrations/postgres/Migration20260509171036_initial.d.ts.map +1 -0
- package/dist/migrations/postgres/Migration20260509171036_initial.js +246 -0
- package/dist/migrations/postgres/Migration20260509171036_initial.js.map +1 -0
- package/dist/migrations/postgres/index.d.ts +3 -0
- package/dist/migrations/postgres/index.d.ts.map +1 -0
- package/dist/migrations/postgres/index.js +3 -0
- package/dist/migrations/postgres/index.js.map +1 -0
- package/dist/migrations/sqlite/Migration20260509171226_initial.d.ts +5 -0
- package/dist/migrations/sqlite/Migration20260509171226_initial.d.ts.map +1 -0
- package/dist/migrations/sqlite/Migration20260509171226_initial.js +62 -0
- package/dist/migrations/sqlite/Migration20260509171226_initial.js.map +1 -0
- package/dist/migrations/sqlite/index.d.ts +3 -0
- package/dist/migrations/sqlite/index.d.ts.map +1 -0
- package/dist/migrations/sqlite/index.js +3 -0
- package/dist/migrations/sqlite/index.js.map +1 -0
- package/dist/seeders/config.seeder.d.ts +2 -0
- package/dist/seeders/config.seeder.d.ts.map +1 -1
- package/dist/seeders/config.seeder.js +87 -0
- package/dist/seeders/config.seeder.js.map +1 -1
- package/dist/services/container.d.ts +5 -1
- package/dist/services/container.d.ts.map +1 -1
- package/dist/services/container.js +4 -3
- package/dist/services/container.js.map +1 -1
- package/package.json +60 -156
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/database/sqlite/sqlite.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/database/sqlite/sqlite.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AASnE,wBAAgB,MAAM,CAAC,QAAQ,EAAE;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;CACf,GAAG,cAAc,CA6BjB"}
|
|
@@ -4,6 +4,7 @@ import { SeedManager } from '@mikro-orm/seeder';
|
|
|
4
4
|
import { NodeSqliteDialect, SqliteDriver } from '@mikro-orm/sql';
|
|
5
5
|
import { resolveCompiledFunctionsForEntities } from "../../../lib/database/compiled-functions.js";
|
|
6
6
|
import { getDatabaseEntities, getDatabaseEntitiesWithMetadata, } from "../../../lib/database/entities.js";
|
|
7
|
+
import { SQLITE_MIGRATIONS } from "../../../migrations/sqlite/index.js";
|
|
7
8
|
import compiledFunctions from './compiled-functions.js';
|
|
8
9
|
export function sqlite(database) {
|
|
9
10
|
const dbName = database.test ? ':memory:' : database.path;
|
|
@@ -16,6 +17,9 @@ export function sqlite(database) {
|
|
|
16
17
|
compiledFunctions: resolveCompiledFunctionsForEntities(getDatabaseEntitiesWithMetadata(), compiledFunctions),
|
|
17
18
|
entities: [...getDatabaseEntities()],
|
|
18
19
|
extensions: [SeedManager, Migrator],
|
|
20
|
+
migrations: {
|
|
21
|
+
migrationsList: SQLITE_MIGRATIONS,
|
|
22
|
+
},
|
|
19
23
|
debug: false,
|
|
20
24
|
});
|
|
21
25
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite.js","sourceRoot":"","sources":["../../../../src/entrypoints/database/sqlite/sqlite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAiB,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEjE,OAAO,EAAE,mCAAmC,EAAE,MAAM,6CAA6C,CAAC;AAClG,OAAO,EACL,mBAAmB,EACnB,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,iBAAiB,MAAM,yBAAyB,CAAC;AAExD,MAAM,UAAU,MAAM,CAAC,QAGtB;IACC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;IAE1D,OAAO;QACL,kBAAkB,EAAE,KAAK,IAAI,EAAE;YAC7B,OAAO,YAAY,CAAC;gBAClB,MAAM,EAAE,YAAY;gBACpB,MAAM,EAAE,MAAM;gBACd,aAAa,EAAE,IAAI,iBAAiB,CAAC,MAAM,CAAC;gBA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7B,OAAO,YAAY,CAAC;gBAClB,MAAM,EAAE,YAAY;gBACpB,MAAM,EAAE,MAAM;gBACd,aAAa,EAAE,IAAI,iBAAiB,CAAC,MAAM,CAAC;gBAC5C,iBAAiB,EAAE,mCAAmC,CACpD,+BAA+B,EAAE,EACjC,iBAAiB,CAClB;gBACD,QAAQ,EAAE,CAAC,GAAG,mBAAmB,EAAE,CAAC;gBACpC,UAAU,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC;gBACnC,UAAU,EAAE;oBACV,cAAc,EAAE,iBAAiB;iBAClC;gBACD,KAAK,EAAE,KAAK;aACb,CAAC,CAAC;QACL,CAAC;QACD,UAAU,EAAE,KAAK,EAAE,GAAa,EAAE,EAAE;YAClC,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;gBAClB,MAAM,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YAC7B,CAAC;iBAAM,CAAC;gBACN,MAAM,GAAG,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YAC1B,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { InitResult, ServiceContainer, } from '../services/container.ts';
|
|
1
|
+
export type { InitializeServicesOptions, InitResult, ServiceContainer, } from '../services/container.ts';
|
|
2
2
|
export { initializeServices } from '../services/container.ts';
|
|
3
3
|
//# sourceMappingURL=services.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/entrypoints/services.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/entrypoints/services.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,yBAAyB,EACzB,UAAU,EACV,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services.js","sourceRoot":"","sources":["../../src/entrypoints/services.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"services.js","sourceRoot":"","sources":["../../src/entrypoints/services.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../../src/lib/database/entities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../../src/lib/database/entities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAmBlD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE;QACJ,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAwBD,wBAAgB,mBAAmB,IAAI,SAAS,UAAU,EAAE,CAE3D;AAED,wBAAgB,+BAA+B,IAAI,SAAS,qBAAqB,EAAE,CAElF"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BootstrapStateEntitySchema } from "../../entities/bootstrap-state.entity.js";
|
|
1
2
|
import { EmailVerificationEntitySchema } from "../../entities/email-verification.entity.js";
|
|
2
3
|
import { JwtKeyEntitySchema } from "../../entities/jwt-key.entity.js";
|
|
3
4
|
import { OAuthClientEntitySchema } from "../../entities/oauth-client.entity.js";
|
|
@@ -32,6 +33,7 @@ function createDatabaseEntities() {
|
|
|
32
33
|
UserTermsConsentEntitySchema,
|
|
33
34
|
UserTotpRecoveryCodeEntitySchema,
|
|
34
35
|
UserTotpEntitySchema,
|
|
36
|
+
BootstrapStateEntitySchema,
|
|
35
37
|
];
|
|
36
38
|
}
|
|
37
39
|
export function getDatabaseEntities() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entities.js","sourceRoot":"","sources":["../../../src/lib/database/entities.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,oCAAoC,EAAE,MAAM,qDAAqD,CAAC;AAC3G,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AASpG,SAAS,sBAAsB;IAC7B,OAAO;QACL,gBAAgB;QAChB,uBAAuB;QACvB,qBAAqB;QACrB,kBAAkB;QAClB,6BAA6B;QAC7B,yBAAyB;QACzB,oCAAoC;QACpC,wBAAwB;QACxB,iBAAiB;QACjB,wBAAwB;QACxB,uBAAu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wBAAwB;QACxB,uBAAuB;QACvB,qBAAqB;QACrB,uBAAuB;QACvB,4BAA4B;QAC5B,gCAAgC;QAChC,oBAAoB;QACpB,0BAA0B;KAC3B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,mBAAmB;IACjC,OAAO,sBAAsB,EAAE,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,+BAA+B;IAC7C,OAAO,sBAAsB,EAAE,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Migration20260509172833_initial.d.ts","sourceRoot":"","sources":["../../../src/migrations/d1/Migration20260509172833_initial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,qBAAa,+BAAgC,SAAQ,SAAS;IACnD,EAAE,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAwLpC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Migration } from '@mikro-orm/migrations';
|
|
2
|
+
export class Migration20260509172833_initial extends Migration {
|
|
3
|
+
up() {
|
|
4
|
+
this.addSql(`create table \`bootstrap_state\` (\`id\` text not null primary key, \`created_at\` datetime not null, \`updated_at\` datetime not null, \`value\` text not null) /* Runtime bootstrap metadata */;`);
|
|
5
|
+
this.addSql(`create table \`jwt_key\` (\`kid\` text not null primary key, \`created_at\` datetime not null, \`updated_at\` datetime not null, \`private_key\` text not null, \`public_key\` text not null, \`algorithm\` text not null default 'RS256', \`status\` text check (\`status\` in ('next', 'active', 'previous', 'retired')) not null default 'next', \`activated_at\` datetime null, \`deactivated_at\` datetime null, \`retired_at\` datetime null, \`expires_at\` datetime null) /* RSA key pairs for JWT signing (RS256) */;`);
|
|
6
|
+
this.addSql(`create index \`jwt_key_status_idx\` on \`jwt_key\` (\`status\`);`);
|
|
7
|
+
this.addSql(`create table \`oauth_client\` (\`id\` text not null primary key, \`created_at\` datetime not null, \`updated_at\` datetime not null, \`client_id\` text not null, \`client_secret_hash\` text null, \`name\` text not null, \`grant_types\` json not null default '[]', \`response_types\` json not null default '[]', \`scopes\` json not null default '[]', \`redirect_uris\` json not null default '[]', \`enabled\` integer not null default true, \`managed_by\` text not null default 'database', \`logo_uri\` text null) /* Registered OAuth clients */;`);
|
|
8
|
+
this.addSql(`create index \`client_client_id_unique\` on \`oauth_client\` (\`client_id\`);`);
|
|
9
|
+
this.addSql(`create table \`pending_oauth_registration\` (\`id\` text not null primary key, \`created_at\` datetime not null, \`updated_at\` datetime not null, \`token\` text not null, \`provider_id\` text not null, \`access_token\` text not null, \`refresh_token\` text null, \`expires_in\` integer null, \`token_type\` text not null, \`user_info\` json not null, \`return_url\` text null, \`expires_at\` datetime not null) /* Server-side store for pending OAuth registrations awaiting terms consent */;`);
|
|
10
|
+
this.addSql(`create unique index \`pending_oauth_registration_token_unique\` on \`pending_oauth_registration\` (\`token\`);`);
|
|
11
|
+
this.addSql(`create index \`pending_oauth_reg_token_idx\` on \`pending_oauth_registration\` (\`token\`);`);
|
|
12
|
+
this.addSql(`create index \`pending_oauth_reg_expires_at_idx\` on \`pending_oauth_registration\` (\`expires_at\`);`);
|
|
13
|
+
this.addSql(`create table \`terms\` (\`id\` text not null primary key, \`created_at\` datetime not null, \`updated_at\` datetime not null, \`required\` integer not null default true, \`consent_mode\` text not null default 'explicit', \`version\` text not null, \`managed_by\` text not null default 'database') /* Terms of service definitions */;`);
|
|
14
|
+
this.addSql(`create table \`terms_content\` (\`id\` text not null primary key, \`created_at\` datetime not null, \`updated_at\` datetime not null, \`terms_id\` text not null, \`lang\` text not null, \`title\` text not null, \`type\` text not null default 'link', \`content\` text not null, constraint \`terms_content_terms_id_foreign\` foreign key (\`terms_id\`) references \`terms\` (\`id\`) on delete cascade) /* Localized content for terms */;`);
|
|
15
|
+
this.addSql(`create index \`terms_content_terms_id_index\` on \`terms_content\` (\`terms_id\`);`);
|
|
16
|
+
this.addSql(`create unique index \`terms_content_terms_lang_unique\` on \`terms_content\` (\`terms_id\`, \`lang\`);`);
|
|
17
|
+
this.addSql(`create table \`user\` (\`sub\` text not null primary key, \`created_at\` datetime not null, \`updated_at\` datetime not null, \`email\` text not null, \`email_verified\` integer not null default false, \`password_hash\` text null, \`managed_by\` text not null default 'database', \`role\` text not null default 'user', \`deleted_at\` datetime null) /* Registered users */;`);
|
|
18
|
+
this.addSql(`create index \`user_email_unique\` on \`user\` (\`email\`);`);
|
|
19
|
+
this.addSql(`create index \`user_deleted_at_idx\` on \`user\` (\`deleted_at\`);`);
|
|
20
|
+
this.addSql(`create table \`user_consent\` (\`id\` text not null primary key, \`created_at\` datetime not null, \`updated_at\` datetime not null, \`user_sub\` text not null, \`client_id\` text not null, \`scopes\` json not null default '[]', \`granted_at\` datetime not null, \`revoked_at\` datetime null, constraint \`user_consent_user_sub_foreign\` foreign key (\`user_sub\`) references \`user\` (\`sub\`), constraint \`user_consent_client_id_foreign\` foreign key (\`client_id\`) references \`oauth_client\` (\`id\`)) /* User consent decisions for OAuth clients */;`);
|
|
21
|
+
this.addSql(`create index \`user_consent_user_sub_index\` on \`user_consent\` (\`user_sub\`);`);
|
|
22
|
+
this.addSql(`create index \`user_consent_client_id_index\` on \`user_consent\` (\`client_id\`);`);
|
|
23
|
+
this.addSql(`create unique index \`user_consent_unique\` on \`user_consent\` (\`user_sub\`, \`client_id\`);`);
|
|
24
|
+
this.addSql(`create table \`revoked_tokens\` (\`id\` text not null primary key, \`created_at\` datetime not null, \`updated_at\` datetime not null, \`jti\` text not null, \`token_type\` text check (\`token_type\` in ('access_token', 'refresh_token')) not null, \`client_id\` text not null, \`user_sub\` text not null, \`expires_at\` datetime not null, \`revoked_at\` datetime not null, constraint \`revoked_tokens_client_id_foreign\` foreign key (\`client_id\`) references \`oauth_client\` (\`id\`), constraint \`revoked_tokens_user_sub_foreign\` foreign key (\`user_sub\`) references \`user\` (\`sub\`)) /* Revoked OAuth tokens for invalidation before expiry */;`);
|
|
25
|
+
this.addSql(`create unique index \`revoked_tokens_jti_unique\` on \`revoked_tokens\` (\`jti\`);`);
|
|
26
|
+
this.addSql(`create index \`revoked_tokens_client_id_index\` on \`revoked_tokens\` (\`client_id\`);`);
|
|
27
|
+
this.addSql(`create index \`revoked_tokens_user_sub_index\` on \`revoked_tokens\` (\`user_sub\`);`);
|
|
28
|
+
this.addSql(`create index \`revoked_token_jti_idx\` on \`revoked_tokens\` (\`jti\`);`);
|
|
29
|
+
this.addSql(`create index \`revoked_token_client_user_idx\` on \`revoked_tokens\` (\`client_id\`, \`user_sub\`);`);
|
|
30
|
+
this.addSql(`create index \`revoked_token_expires_at_idx\` on \`revoked_tokens\` (\`expires_at\`);`);
|
|
31
|
+
this.addSql(`create table \`password_reset\` (\`id\` text not null primary key, \`created_at\` datetime not null, \`updated_at\` datetime not null, \`user_sub\` text not null, \`token\` text not null, \`expires_at\` datetime not null, \`used\` integer not null default false, \`used_at\` datetime null, constraint \`password_reset_user_sub_foreign\` foreign key (\`user_sub\`) references \`user\` (\`sub\`)) /* Password reset tokens for user password recovery */;`);
|
|
32
|
+
this.addSql(`create index \`password_reset_user_sub_idx\` on \`password_reset\` (\`user_sub\`);`);
|
|
33
|
+
this.addSql(`create index \`password_reset_token_idx\` on \`password_reset\` (\`token\`);`);
|
|
34
|
+
this.addSql(`create table \`oauth_code\` (\`id\` text not null primary key, \`created_at\` datetime not null, \`updated_at\` datetime not null, \`code_hash\` text not null, \`client_id\` text not null, \`user_sub\` text not null, \`redirect_uri\` text null, \`scope\` json not null default '[]', \`nonce\` text not null, \`code_challenge\` text not null, \`code_challenge_method\` text check (\`code_challenge_method\` in ('S256', 'plain')) not null default 'S256', \`expired_at\` datetime not null, \`consumed_at\` datetime null, \`auth_time\` integer null, constraint \`oauth_code_client_id_foreign\` foreign key (\`client_id\`) references \`oauth_client\` (\`id\`), constraint \`oauth_code_user_sub_foreign\` foreign key (\`user_sub\`) references \`user\` (\`sub\`)) /* Issued OAuth authorization codes */;`);
|
|
35
|
+
this.addSql(`create unique index \`oauth_code_code_hash_unique\` on \`oauth_code\` (\`code_hash\`);`);
|
|
36
|
+
this.addSql(`create index \`oauth_code_client_id_index\` on \`oauth_code\` (\`client_id\`);`);
|
|
37
|
+
this.addSql(`create index \`oauth_code_user_sub_index\` on \`oauth_code\` (\`user_sub\`);`);
|
|
38
|
+
this.addSql(`create index \`auth_code_hash_idx\` on \`oauth_code\` (\`code_hash\`);`);
|
|
39
|
+
this.addSql(`create index \`oauth_code_client_consumed_idx\` on \`oauth_code\` (\`client_id\`, \`consumed_at\`);`);
|
|
40
|
+
this.addSql(`create index \`oauth_code_expired_at_idx\` on \`oauth_code\` (\`expired_at\`);`);
|
|
41
|
+
this.addSql(`create table \`email_verification\` (\`id\` text not null primary key, \`created_at\` datetime not null, \`updated_at\` datetime not null, \`user_sub\` text not null, \`token\` text not null, \`expires_at\` datetime not null, \`verified\` integer not null default false, \`verified_at\` datetime null, constraint \`email_verification_user_sub_foreign\` foreign key (\`user_sub\`) references \`user\` (\`sub\`)) /* Email verification tokens for user registration */;`);
|
|
42
|
+
this.addSql(`create index \`email_verification_user_sub_idx\` on \`email_verification\` (\`user_sub\`);`);
|
|
43
|
+
this.addSql(`create index \`email_verification_token_idx\` on \`email_verification\` (\`token\`);`);
|
|
44
|
+
this.addSql(`create table \`user_oauth\` (\`id\` integer not null primary key autoincrement, \`created_at\` datetime not null, \`updated_at\` datetime not null, \`user_sub\` text not null, \`provider_name\` text not null, \`provider_user_id\` text not null, \`access_token\` text not null, \`refresh_token\` text not null, \`expires_at\` datetime null, constraint \`user_oauth_user_sub_foreign\` foreign key (\`user_sub\`) references \`user\` (\`sub\`)) /* OAuth accounts linked to users */;`);
|
|
45
|
+
this.addSql(`create index \`user_oauth_user_sub_idx\` on \`user_oauth\` (\`user_sub\`);`);
|
|
46
|
+
this.addSql(`create index \`user_oauth_user_provider_idx\` on \`user_oauth\` (\`user_sub\`, \`provider_name\`);`);
|
|
47
|
+
this.addSql(`create unique index \`user_oauth_provider_unique\` on \`user_oauth\` (\`provider_name\`, \`provider_user_id\`);`);
|
|
48
|
+
this.addSql(`create table \`user_passkey\` (\`id\` text not null primary key, \`created_at\` datetime not null, \`updated_at\` datetime not null, \`user_sub\` text not null, \`credential_id\` text not null, \`public_key\` text not null, \`counter\` integer not null default 0, \`device_type\` text not null default 'singleDevice', \`backed_up\` integer not null default false, \`transports\` json null, \`name\` text null, \`aaguid\` text null, constraint \`user_passkey_user_sub_foreign\` foreign key (\`user_sub\`) references \`user\` (\`sub\`) on delete cascade) /* User passkeys for WebAuthn authentication */;`);
|
|
49
|
+
this.addSql(`create index \`user_passkey_user_sub_idx\` on \`user_passkey\` (\`user_sub\`);`);
|
|
50
|
+
this.addSql(`create index \`user_passkey_credential_id_unique\` on \`user_passkey\` (\`credential_id\`);`);
|
|
51
|
+
this.addSql(`create table \`user_terms_consent\` (\`id\` text not null primary key, \`created_at\` datetime not null, \`updated_at\` datetime not null, \`user_sub\` text not null, \`terms_id\` text not null, \`terms_version\` text not null, \`agreed\` integer not null, \`consent_type\` text not null, \`agreed_at\` datetime not null, constraint \`user_terms_consent_user_sub_foreign\` foreign key (\`user_sub\`) references \`user\` (\`sub\`) on delete cascade, constraint \`user_terms_consent_terms_id_foreign\` foreign key (\`terms_id\`) references \`terms\` (\`id\`) on delete cascade) /* User consent records for terms of service */;`);
|
|
52
|
+
this.addSql(`create index \`user_terms_consent_user_sub_index\` on \`user_terms_consent\` (\`user_sub\`);`);
|
|
53
|
+
this.addSql(`create index \`user_terms_consent_terms_id_index\` on \`user_terms_consent\` (\`terms_id\`);`);
|
|
54
|
+
this.addSql(`create index \`user_terms_consent_user_terms_index\` on \`user_terms_consent\` (\`user_sub\`, \`terms_id\`);`);
|
|
55
|
+
this.addSql(`create table \`user_totp\` (\`id\` text not null primary key, \`created_at\` datetime not null, \`updated_at\` datetime not null, \`user_sub\` text not null, \`secret\` text not null, \`verified\` integer not null default false, \`recovery_confirmed\` integer not null default false, constraint \`user_totp_user_sub_foreign\` foreign key (\`user_sub\`) references \`user\` (\`sub\`) on delete cascade) /* User TOTP secrets for two-factor authentication */;`);
|
|
56
|
+
this.addSql(`create index \`user_totp_user_sub_index\` on \`user_totp\` (\`user_sub\`);`);
|
|
57
|
+
this.addSql(`create unique index \`user_totp_user_unique\` on \`user_totp\` (\`user_sub\`);`);
|
|
58
|
+
this.addSql(`create table \`user_totp_recovery_code\` (\`id\` text not null primary key, \`created_at\` datetime not null, \`updated_at\` datetime not null, \`user_sub\` text not null, \`code_hash\` text not null, \`used\` integer not null default false, \`used_at\` datetime null, constraint \`user_totp_recovery_code_user_sub_foreign\` foreign key (\`user_sub\`) references \`user\` (\`sub\`) on delete cascade) /* One-time recovery codes for TOTP two-factor authentication */;`);
|
|
59
|
+
this.addSql(`create index \`user_totp_recovery_code_user_sub_idx\` on \`user_totp_recovery_code\` (\`user_sub\`);`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=Migration20260509172833_initial.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Migration20260509172833_initial.js","sourceRoot":"","sources":["../../../src/migrations/d1/Migration20260509172833_initial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,MAAM,OAAO,+BAAgC,SAAQ,SAAS;IACnD,EAAE;QACT,IAAI,CAAC,MAAM,CACT,oMAAoM,CACrM,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,ggBAAggB,CACjgB,CAAC;QACF,IAAI,CAAC,MAAM,CACT,kEAAkE,CACnE,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,iiBAAiiB,CACliB,CAAC;QACF,IAAI,CAAC,MAAM,CACT,+EAA+E,CAChF,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,6eAA6e,CAC9e,CAAC;QACF,IAAI,CAAC,MAAM,CACT,gHAAgH,CACjH,CAAC;QACF,IAAI,CAAC,MAAM,CACT,6FAA6F,CAC9F,CAAC;QACF,IAAI,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,CAAC,MAAM,CACT,8EAA8E,CAC/E,CAAC;QACF,IAAI,CAAC,MAAM,CACT,wEAAwE,CACzE,CAAC;QACF,IAAI,CAAC,MAAM,CACT,qGAAqG,CACtG,CAAC;QACF,IAAI,CAAC,MAAM,CACT,gFAAgF,CACjF,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,mdAAmd,CACpd,CAAC;QACF,IAAI,CAAC,MAAM,CACT,4FAA4F,CAC7F,CAAC;QACF,IAAI,CAAC,MAAM,CACT,sFAAsF,CACvF,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,geAAge,CACje,CAAC;QACF,IAAI,CAAC,MAAM,CACT,4EAA4E,CAC7E,CAAC;QACF,IAAI,CAAC,MAAM,CACT,oGAAoG,CACrG,CAAC;QACF,IAAI,CAAC,MAAM,CACT,iHAAiH,CAClH,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,2lBAA2lB,CAC5lB,CAAC;QACF,IAAI,CAAC,MAAM,CACT,gFAAgF,CACjF,CAAC;QACF,IAAI,CAAC,MAAM,CACT,6FAA6F,CAC9F,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,knBAAknB,CACnnB,CAAC;QACF,IAAI,CAAC,MAAM,CACT,8FAA8F,CAC/F,CAAC;QACF,IAAI,CAAC,MAAM,CACT,8FAA8F,CAC/F,CAAC;QACF,IAAI,CAAC,MAAM,CACT,8GAA8G,CAC/G,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,0cAA0c,CAC3c,CAAC;QACF,IAAI,CAAC,MAAM,CACT,4EAA4E,CAC7E,CAAC;QACF,IAAI,CAAC,MAAM,CACT,gFAAgF,CACjF,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,odAAod,CACrd,CAAC;QACF,IAAI,CAAC,MAAM,CACT,sGAAsG,CACvG,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/migrations/d1/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAEvF,eAAO,MAAM,aAAa,4CAAoC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/migrations/d1/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAEvF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,+BAA+B,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Migration20260509171036_initial.d.ts","sourceRoot":"","sources":["../../../src/migrations/postgres/Migration20260509171036_initial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,qBAAa,+BAAgC,SAAQ,SAAS;IACnD,EAAE,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CA+tBpC"}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { Migration } from '@mikro-orm/migrations';
|
|
2
|
+
export class Migration20260509171036_initial extends Migration {
|
|
3
|
+
up() {
|
|
4
|
+
this.addSql(`create table "bootstrap_state" ("id" varchar(255) not null, "created_at" timestamptz not null, "updated_at" timestamptz not null, "value" varchar(255) not null, primary key ("id"));`);
|
|
5
|
+
this.addSql(`comment on table "bootstrap_state" is 'Runtime bootstrap metadata';`);
|
|
6
|
+
this.addSql(`comment on column "bootstrap_state"."id" is 'Bootstrap metadata key';`);
|
|
7
|
+
this.addSql(`comment on column "bootstrap_state"."created_at" is 'Timestamp when the entity was created';`);
|
|
8
|
+
this.addSql(`comment on column "bootstrap_state"."updated_at" is 'Timestamp when the entity was last updated';`);
|
|
9
|
+
this.addSql(`comment on column "bootstrap_state"."value" is 'Bootstrap metadata value';`);
|
|
10
|
+
this.addSql(`create table "jwt_key" ("kid" varchar(255) not null, "created_at" timestamptz not null, "updated_at" timestamptz not null, "private_key" text not null, "public_key" text not null, "algorithm" varchar(255) not null default 'RS256', "status" text not null default 'next', "activated_at" timestamptz null, "deactivated_at" timestamptz null, "retired_at" timestamptz null, "expires_at" timestamptz null, primary key ("kid"));`);
|
|
11
|
+
this.addSql(`comment on table "jwt_key" is 'RSA key pairs for JWT signing (RS256)';`);
|
|
12
|
+
this.addSql(`comment on column "jwt_key"."kid" is 'Key ID for JWT header (kid claim)';`);
|
|
13
|
+
this.addSql(`comment on column "jwt_key"."created_at" is 'Timestamp when the entity was created';`);
|
|
14
|
+
this.addSql(`comment on column "jwt_key"."updated_at" is 'Timestamp when the entity was last updated';`);
|
|
15
|
+
this.addSql(`comment on column "jwt_key"."private_key" is 'RSA private key in PEM format';`);
|
|
16
|
+
this.addSql(`comment on column "jwt_key"."public_key" is 'RSA public key in PEM format';`);
|
|
17
|
+
this.addSql(`comment on column "jwt_key"."algorithm" is 'JWT signing algorithm (RS256)';`);
|
|
18
|
+
this.addSql(`comment on column "jwt_key"."status" is 'Key status: next, active, previous, retired';`);
|
|
19
|
+
this.addSql(`comment on column "jwt_key"."activated_at" is 'When the key was activated for signing';`);
|
|
20
|
+
this.addSql(`comment on column "jwt_key"."deactivated_at" is 'When the key was deactivated from signing';`);
|
|
21
|
+
this.addSql(`comment on column "jwt_key"."retired_at" is 'When the key was fully retired';`);
|
|
22
|
+
this.addSql(`comment on column "jwt_key"."expires_at" is 'Scheduled expiration for automatic rotation';`);
|
|
23
|
+
this.addSql(`create index "jwt_key_status_idx" on "jwt_key" ("status");`);
|
|
24
|
+
this.addSql(`alter table "jwt_key" add constraint "jwt_key_status_check" check ("status" in ('next', 'active', 'previous', 'retired'));`);
|
|
25
|
+
this.addSql(`create table "oauth_client" ("id" uuid not null, "created_at" timestamptz not null, "updated_at" timestamptz not null, "client_id" varchar(255) not null, "client_secret_hash" varchar(255) null, "name" varchar(255) not null, "grant_types" jsonb not null default '[]', "response_types" jsonb not null default '[]', "scopes" jsonb not null default '[]', "redirect_uris" jsonb not null default '[]', "enabled" boolean not null default true, "managed_by" varchar(255) not null default 'database', "logo_uri" varchar(255) null, primary key ("id"));`);
|
|
26
|
+
this.addSql(`comment on table "oauth_client" is 'Registered OAuth clients';`);
|
|
27
|
+
this.addSql(`comment on column "oauth_client"."id" is 'Primary key as UUID';`);
|
|
28
|
+
this.addSql(`comment on column "oauth_client"."created_at" is 'Timestamp when the entity was created';`);
|
|
29
|
+
this.addSql(`comment on column "oauth_client"."updated_at" is 'Timestamp when the entity was last updated';`);
|
|
30
|
+
this.addSql(`comment on column "oauth_client"."client_id" is 'Public client identifier';`);
|
|
31
|
+
this.addSql(`comment on column "oauth_client"."client_secret_hash" is 'Hash of the client secret (null for public clients using PKCE)';`);
|
|
32
|
+
this.addSql(`comment on column "oauth_client"."name" is 'Human-readable name of the OAuth client';`);
|
|
33
|
+
this.addSql(`comment on column "oauth_client"."grant_types" is 'Allowed OAuth grant types for the client';`);
|
|
34
|
+
this.addSql(`comment on column "oauth_client"."response_types" is 'Allowed OAuth response types for the client';`);
|
|
35
|
+
this.addSql(`comment on column "oauth_client"."scopes" is 'Allowed OAuth scopes for the client';`);
|
|
36
|
+
this.addSql(`comment on column "oauth_client"."redirect_uris" is 'Registered redirect URIs for the client';`);
|
|
37
|
+
this.addSql(`comment on column "oauth_client"."enabled" is 'Whether the OAuth client is enabled';`);
|
|
38
|
+
this.addSql(`comment on column "oauth_client"."managed_by" is 'Data source: config (from YAML) or database (runtime created)';`);
|
|
39
|
+
this.addSql(`comment on column "oauth_client"."logo_uri" is 'Logo URI for the OAuth client';`);
|
|
40
|
+
this.addSql(`create index "client_client_id_unique" on "oauth_client" ("client_id");`);
|
|
41
|
+
this.addSql(`create table "pending_oauth_registration" ("id" uuid not null, "created_at" timestamptz not null, "updated_at" timestamptz not null, "token" varchar(255) not null, "provider_id" varchar(255) not null, "access_token" text not null, "refresh_token" text null, "expires_in" int null, "token_type" varchar(255) not null, "user_info" jsonb not null, "return_url" varchar(255) null, "expires_at" timestamptz not null, primary key ("id"));`);
|
|
42
|
+
this.addSql(`comment on table "pending_oauth_registration" is 'Server-side store for pending OAuth registrations awaiting terms consent';`);
|
|
43
|
+
this.addSql(`comment on column "pending_oauth_registration"."id" is 'Primary key as UUID';`);
|
|
44
|
+
this.addSql(`comment on column "pending_oauth_registration"."created_at" is 'Timestamp when the entity was created';`);
|
|
45
|
+
this.addSql(`comment on column "pending_oauth_registration"."updated_at" is 'Timestamp when the entity was last updated';`);
|
|
46
|
+
this.addSql(`comment on column "pending_oauth_registration"."token" is 'Unique lookup token stored in the session cookie';`);
|
|
47
|
+
this.addSql(`comment on column "pending_oauth_registration"."provider_id" is 'OAuth provider identifier';`);
|
|
48
|
+
this.addSql(`comment on column "pending_oauth_registration"."access_token" is 'OAuth access token from the provider';`);
|
|
49
|
+
this.addSql(`comment on column "pending_oauth_registration"."refresh_token" is 'OAuth refresh token from the provider';`);
|
|
50
|
+
this.addSql(`comment on column "pending_oauth_registration"."expires_in" is 'Token expiration duration in seconds';`);
|
|
51
|
+
this.addSql(`comment on column "pending_oauth_registration"."token_type" is 'OAuth token type (e.g. Bearer)';`);
|
|
52
|
+
this.addSql(`comment on column "pending_oauth_registration"."user_info" is 'Normalized user info from the OAuth provider';`);
|
|
53
|
+
this.addSql(`comment on column "pending_oauth_registration"."return_url" is 'URL to redirect to after registration completes';`);
|
|
54
|
+
this.addSql(`comment on column "pending_oauth_registration"."expires_at" is 'Absolute expiry timestamp for this pending registration';`);
|
|
55
|
+
this.addSql(`alter table "pending_oauth_registration" add constraint "pending_oauth_registration_token_unique" unique ("token");`);
|
|
56
|
+
this.addSql(`create index "pending_oauth_reg_token_idx" on "pending_oauth_registration" ("token");`);
|
|
57
|
+
this.addSql(`create index "pending_oauth_reg_expires_at_idx" on "pending_oauth_registration" ("expires_at");`);
|
|
58
|
+
this.addSql(`create table "terms" ("id" varchar(255) not null, "created_at" timestamptz not null, "updated_at" timestamptz not null, "required" boolean not null default true, "consent_mode" varchar(255) not null default 'explicit', "version" varchar(255) not null, "managed_by" varchar(255) not null default 'database', primary key ("id"));`);
|
|
59
|
+
this.addSql(`comment on table "terms" is 'Terms of service definitions';`);
|
|
60
|
+
this.addSql(`comment on column "terms"."id" is 'Unique identifier (e.g., "tos", "privacy")';`);
|
|
61
|
+
this.addSql(`comment on column "terms"."created_at" is 'Timestamp when the entity was created';`);
|
|
62
|
+
this.addSql(`comment on column "terms"."updated_at" is 'Timestamp when the entity was last updated';`);
|
|
63
|
+
this.addSql(`comment on column "terms"."required" is 'Whether agreement is mandatory';`);
|
|
64
|
+
this.addSql(`comment on column "terms"."consent_mode" is 'Consent mode: explicit (checkbox) or implicit (auto-agree)';`);
|
|
65
|
+
this.addSql(`comment on column "terms"."version" is 'Version string (e.g., "1.0.0")';`);
|
|
66
|
+
this.addSql(`comment on column "terms"."managed_by" is 'Data source: config or database';`);
|
|
67
|
+
this.addSql(`create table "terms_content" ("id" uuid not null, "created_at" timestamptz not null, "updated_at" timestamptz not null, "terms_id" varchar(255) not null, "lang" varchar(255) not null, "title" varchar(255) not null, "type" varchar(255) not null default 'link', "content" text not null, primary key ("id"));`);
|
|
68
|
+
this.addSql(`comment on table "terms_content" is 'Localized content for terms';`);
|
|
69
|
+
this.addSql(`comment on column "terms_content"."id" is 'Primary key as UUID';`);
|
|
70
|
+
this.addSql(`comment on column "terms_content"."created_at" is 'Timestamp when the entity was created';`);
|
|
71
|
+
this.addSql(`comment on column "terms_content"."updated_at" is 'Timestamp when the entity was last updated';`);
|
|
72
|
+
this.addSql(`comment on column "terms_content"."terms_id" is 'Reference to the terms';`);
|
|
73
|
+
this.addSql(`comment on column "terms_content"."lang" is 'Language code (e.g., "en", "ko", "ja")';`);
|
|
74
|
+
this.addSql(`comment on column "terms_content"."title" is 'Display title';`);
|
|
75
|
+
this.addSql(`comment on column "terms_content"."type" is 'Content type: link or text';`);
|
|
76
|
+
this.addSql(`comment on column "terms_content"."content" is 'Content value (URL if type=link, text if type=text)';`);
|
|
77
|
+
this.addSql(`alter table "terms_content" add constraint "terms_content_terms_lang_unique" unique ("terms_id", "lang");`);
|
|
78
|
+
this.addSql(`create table "user" ("sub" uuid not null, "created_at" timestamptz not null, "updated_at" timestamptz not null, "email" varchar(255) not null, "email_verified" boolean not null default false, "password_hash" varchar(255) null, "managed_by" varchar(255) not null default 'database', "role" varchar(255) not null default 'user', "deleted_at" timestamptz null, primary key ("sub"));`);
|
|
79
|
+
this.addSql(`comment on table "user" is 'Registered users';`);
|
|
80
|
+
this.addSql(`comment on column "user"."sub" is 'Subject identifier as UUID';`);
|
|
81
|
+
this.addSql(`comment on column "user"."created_at" is 'Timestamp when the entity was created';`);
|
|
82
|
+
this.addSql(`comment on column "user"."updated_at" is 'Timestamp when the entity was last updated';`);
|
|
83
|
+
this.addSql(`comment on column "user"."email" is 'User email address';`);
|
|
84
|
+
this.addSql(`comment on column "user"."email_verified" is 'Whether the user''s email has been verified';`);
|
|
85
|
+
this.addSql(`comment on column "user"."password_hash" is 'Hashed password for local authentication';`);
|
|
86
|
+
this.addSql(`comment on column "user"."managed_by" is 'Data source: config (from YAML) or database (runtime created)';`);
|
|
87
|
+
this.addSql(`comment on column "user"."role" is 'User role: user or admin';`);
|
|
88
|
+
this.addSql(`comment on column "user"."deleted_at" is 'Timestamp when the user requested account deletion (soft delete)';`);
|
|
89
|
+
this.addSql(`create index "user_email_unique" on "user" ("email");`);
|
|
90
|
+
this.addSql(`create index "user_deleted_at_idx" on "user" ("deleted_at");`);
|
|
91
|
+
this.addSql(`create table "user_consent" ("id" uuid not null, "created_at" timestamptz not null, "updated_at" timestamptz not null, "user_sub" uuid not null, "client_id" uuid not null, "scopes" jsonb not null default '[]', "granted_at" timestamptz not null, "revoked_at" timestamptz null, primary key ("id"));`);
|
|
92
|
+
this.addSql(`comment on table "user_consent" is 'User consent decisions for OAuth clients';`);
|
|
93
|
+
this.addSql(`comment on column "user_consent"."id" is 'Primary key as UUID';`);
|
|
94
|
+
this.addSql(`comment on column "user_consent"."created_at" is 'Timestamp when the entity was created';`);
|
|
95
|
+
this.addSql(`comment on column "user_consent"."updated_at" is 'Timestamp when the entity was last updated';`);
|
|
96
|
+
this.addSql(`comment on column "user_consent"."user_sub" is 'Reference to the user who granted consent';`);
|
|
97
|
+
this.addSql(`comment on column "user_consent"."client_id" is 'Reference to the OAuth client that received consent';`);
|
|
98
|
+
this.addSql(`comment on column "user_consent"."scopes" is 'List of scopes the user has consented to';`);
|
|
99
|
+
this.addSql(`comment on column "user_consent"."granted_at" is 'Timestamp when consent was first granted';`);
|
|
100
|
+
this.addSql(`comment on column "user_consent"."revoked_at" is 'Timestamp when consent was revoked (null if active)';`);
|
|
101
|
+
this.addSql(`create index "user_consent_user_sub_index" on "user_consent" ("user_sub");`);
|
|
102
|
+
this.addSql(`create index "user_consent_client_id_index" on "user_consent" ("client_id");`);
|
|
103
|
+
this.addSql(`alter table "user_consent" add constraint "user_consent_unique" unique ("user_sub", "client_id");`);
|
|
104
|
+
this.addSql(`create table "revoked_tokens" ("id" uuid not null, "created_at" timestamptz not null, "updated_at" timestamptz not null, "jti" varchar(255) not null, "token_type" text not null, "client_id" uuid not null, "user_sub" uuid not null, "expires_at" timestamptz not null, "revoked_at" timestamptz not null, primary key ("id"));`);
|
|
105
|
+
this.addSql(`comment on table "revoked_tokens" is 'Revoked OAuth tokens for invalidation before expiry';`);
|
|
106
|
+
this.addSql(`comment on column "revoked_tokens"."id" is 'Primary key as UUID';`);
|
|
107
|
+
this.addSql(`comment on column "revoked_tokens"."created_at" is 'Timestamp when the entity was created';`);
|
|
108
|
+
this.addSql(`comment on column "revoked_tokens"."updated_at" is 'Timestamp when the entity was last updated';`);
|
|
109
|
+
this.addSql(`comment on column "revoked_tokens"."jti" is 'JWT ID (jti claim) of the revoked token';`);
|
|
110
|
+
this.addSql(`comment on column "revoked_tokens"."token_type" is 'Type of the revoked token (access_token or refresh_token)';`);
|
|
111
|
+
this.addSql(`comment on column "revoked_tokens"."client_id" is 'Reference to the OAuth client that the token was issued to';`);
|
|
112
|
+
this.addSql(`comment on column "revoked_tokens"."user_sub" is 'Reference to the user (subject) that the token was issued for';`);
|
|
113
|
+
this.addSql(`comment on column "revoked_tokens"."expires_at" is 'Original expiration time of the token. Used for cleanup of expired entries.';`);
|
|
114
|
+
this.addSql(`comment on column "revoked_tokens"."revoked_at" is 'Timestamp when the token was revoked';`);
|
|
115
|
+
this.addSql(`alter table "revoked_tokens" add constraint "revoked_tokens_jti_unique" unique ("jti");`);
|
|
116
|
+
this.addSql(`create index "revoked_token_jti_idx" on "revoked_tokens" ("jti");`);
|
|
117
|
+
this.addSql(`create index "revoked_token_client_user_idx" on "revoked_tokens" ("client_id", "user_sub");`);
|
|
118
|
+
this.addSql(`create index "revoked_token_expires_at_idx" on "revoked_tokens" ("expires_at");`);
|
|
119
|
+
this.addSql(`alter table "revoked_tokens" add constraint "revoked_tokens_token_type_check" check ("token_type" in ('access_token', 'refresh_token'));`);
|
|
120
|
+
this.addSql(`create table "password_reset" ("id" uuid not null, "created_at" timestamptz not null, "updated_at" timestamptz not null, "user_sub" uuid not null, "token" varchar(255) not null, "expires_at" timestamptz not null, "used" boolean not null default false, "used_at" timestamptz null, primary key ("id"));`);
|
|
121
|
+
this.addSql(`comment on table "password_reset" is 'Password reset tokens for user password recovery';`);
|
|
122
|
+
this.addSql(`comment on column "password_reset"."id" is 'Primary key as UUID';`);
|
|
123
|
+
this.addSql(`comment on column "password_reset"."created_at" is 'Timestamp when the entity was created';`);
|
|
124
|
+
this.addSql(`comment on column "password_reset"."updated_at" is 'Timestamp when the entity was last updated';`);
|
|
125
|
+
this.addSql(`comment on column "password_reset"."user_sub" is 'Reference to the user';`);
|
|
126
|
+
this.addSql(`comment on column "password_reset"."token" is 'Unique password reset token';`);
|
|
127
|
+
this.addSql(`comment on column "password_reset"."expires_at" is 'Token expiration timestamp';`);
|
|
128
|
+
this.addSql(`comment on column "password_reset"."used" is 'Whether the token has been used';`);
|
|
129
|
+
this.addSql(`comment on column "password_reset"."used_at" is 'Timestamp when the token was used';`);
|
|
130
|
+
this.addSql(`create index "password_reset_user_sub_idx" on "password_reset" ("user_sub");`);
|
|
131
|
+
this.addSql(`create index "password_reset_token_idx" on "password_reset" ("token");`);
|
|
132
|
+
this.addSql(`create table "oauth_code" ("id" uuid not null, "created_at" timestamptz not null, "updated_at" timestamptz not null, "code_hash" varchar(255) not null, "client_id" uuid not null, "user_sub" uuid not null, "redirect_uri" varchar(255) null, "scope" jsonb not null default '[]', "nonce" varchar(255) not null, "code_challenge" varchar(255) not null, "code_challenge_method" text not null default 'S256', "expired_at" timestamptz not null, "consumed_at" timestamptz null, "auth_time" int null, primary key ("id"));`);
|
|
133
|
+
this.addSql(`comment on table "oauth_code" is 'Issued OAuth authorization codes';`);
|
|
134
|
+
this.addSql(`comment on column "oauth_code"."id" is 'Primary key as UUID';`);
|
|
135
|
+
this.addSql(`comment on column "oauth_code"."created_at" is 'Timestamp when the entity was created';`);
|
|
136
|
+
this.addSql(`comment on column "oauth_code"."updated_at" is 'Timestamp when the entity was last updated';`);
|
|
137
|
+
this.addSql(`comment on column "oauth_code"."code_hash" is 'Hash of the issued authorization code';`);
|
|
138
|
+
this.addSql(`comment on column "oauth_code"."client_id" is 'Reference to the OAuth client that requested the code';`);
|
|
139
|
+
this.addSql(`comment on column "oauth_code"."user_sub" is 'Reference to the resource owner (user)';`);
|
|
140
|
+
this.addSql(`comment on column "oauth_code"."redirect_uri" is 'Redirect URI used during the authorization request';`);
|
|
141
|
+
this.addSql(`comment on column "oauth_code"."scope" is 'Scopes granted by the authorization code';`);
|
|
142
|
+
this.addSql(`comment on column "oauth_code"."nonce" is 'Nonce value associated with the authorization request';`);
|
|
143
|
+
this.addSql(`comment on column "oauth_code"."code_challenge" is 'PKCE code challenge value';`);
|
|
144
|
+
this.addSql(`comment on column "oauth_code"."code_challenge_method" is 'PKCE code challenge method';`);
|
|
145
|
+
this.addSql(`comment on column "oauth_code"."expired_at" is 'Absolute expiry timestamp for the code';`);
|
|
146
|
+
this.addSql(`comment on column "oauth_code"."consumed_at" is 'Timestamp when the code was redeemed';`);
|
|
147
|
+
this.addSql(`comment on column "oauth_code"."auth_time" is 'Time when the End-User authentication occurred (Unix timestamp). Used for auth_time claim in ID Token (OIDC Core 1.0 §2)';`);
|
|
148
|
+
this.addSql(`alter table "oauth_code" add constraint "oauth_code_code_hash_unique" unique ("code_hash");`);
|
|
149
|
+
this.addSql(`create index "auth_code_hash_idx" on "oauth_code" ("code_hash");`);
|
|
150
|
+
this.addSql(`create index "oauth_code_client_consumed_idx" on "oauth_code" ("client_id", "consumed_at");`);
|
|
151
|
+
this.addSql(`create index "oauth_code_expired_at_idx" on "oauth_code" ("expired_at");`);
|
|
152
|
+
this.addSql(`alter table "oauth_code" add constraint "oauth_code_code_challenge_method_check" check ("code_challenge_method" in ('S256', 'plain'));`);
|
|
153
|
+
this.addSql(`create table "email_verification" ("id" uuid not null, "created_at" timestamptz not null, "updated_at" timestamptz not null, "user_sub" uuid not null, "token" varchar(255) not null, "expires_at" timestamptz not null, "verified" boolean not null default false, "verified_at" timestamptz null, primary key ("id"));`);
|
|
154
|
+
this.addSql(`comment on table "email_verification" is 'Email verification tokens for user registration';`);
|
|
155
|
+
this.addSql(`comment on column "email_verification"."id" is 'Primary key as UUID';`);
|
|
156
|
+
this.addSql(`comment on column "email_verification"."created_at" is 'Timestamp when the entity was created';`);
|
|
157
|
+
this.addSql(`comment on column "email_verification"."updated_at" is 'Timestamp when the entity was last updated';`);
|
|
158
|
+
this.addSql(`comment on column "email_verification"."user_sub" is 'Reference to the user';`);
|
|
159
|
+
this.addSql(`comment on column "email_verification"."token" is 'Unique verification token';`);
|
|
160
|
+
this.addSql(`comment on column "email_verification"."expires_at" is 'Token expiration timestamp';`);
|
|
161
|
+
this.addSql(`comment on column "email_verification"."verified" is 'Whether the token has been used';`);
|
|
162
|
+
this.addSql(`comment on column "email_verification"."verified_at" is 'Timestamp when the email was verified';`);
|
|
163
|
+
this.addSql(`create index "email_verification_user_sub_idx" on "email_verification" ("user_sub");`);
|
|
164
|
+
this.addSql(`create index "email_verification_token_idx" on "email_verification" ("token");`);
|
|
165
|
+
this.addSql(`create table "user_oauth" ("id" bigserial primary key, "created_at" timestamptz not null, "updated_at" timestamptz not null, "user_sub" uuid not null, "provider_name" varchar(255) not null, "provider_user_id" varchar(255) not null, "access_token" varchar(255) not null, "refresh_token" varchar(255) not null, "expires_at" timestamptz null);`);
|
|
166
|
+
this.addSql(`comment on table "user_oauth" is 'OAuth accounts linked to users';`);
|
|
167
|
+
this.addSql(`comment on column "user_oauth"."id" is 'Primary key as auto-incrementing bigint';`);
|
|
168
|
+
this.addSql(`comment on column "user_oauth"."created_at" is 'Timestamp when the entity was created';`);
|
|
169
|
+
this.addSql(`comment on column "user_oauth"."updated_at" is 'Timestamp when the entity was last updated';`);
|
|
170
|
+
this.addSql(`comment on column "user_oauth"."user_sub" is 'Reference to the user';`);
|
|
171
|
+
this.addSql(`comment on column "user_oauth"."provider_name" is 'Name of the OAuth provider (e.g., google, facebook)';`);
|
|
172
|
+
this.addSql(`comment on column "user_oauth"."provider_user_id" is 'Unique user ID from the OAuth provider';`);
|
|
173
|
+
this.addSql(`comment on column "user_oauth"."access_token" is 'OAuth access token';`);
|
|
174
|
+
this.addSql(`comment on column "user_oauth"."refresh_token" is 'OAuth refresh token';`);
|
|
175
|
+
this.addSql(`comment on column "user_oauth"."expires_at" is 'Access token expiry timestamp';`);
|
|
176
|
+
this.addSql(`create index "user_oauth_user_sub_idx" on "user_oauth" ("user_sub");`);
|
|
177
|
+
this.addSql(`create index "user_oauth_user_provider_idx" on "user_oauth" ("user_sub", "provider_name");`);
|
|
178
|
+
this.addSql(`alter table "user_oauth" add constraint "user_oauth_provider_unique" unique ("provider_name", "provider_user_id");`);
|
|
179
|
+
this.addSql(`create table "user_passkey" ("id" uuid not null, "created_at" timestamptz not null, "updated_at" timestamptz not null, "user_sub" uuid not null, "credential_id" varchar(255) not null, "public_key" text not null, "counter" int not null default 0, "device_type" varchar(255) not null default 'singleDevice', "backed_up" boolean not null default false, "transports" jsonb null, "name" varchar(255) null, "aaguid" varchar(255) null, primary key ("id"));`);
|
|
180
|
+
this.addSql(`comment on table "user_passkey" is 'User passkeys for WebAuthn authentication';`);
|
|
181
|
+
this.addSql(`comment on column "user_passkey"."id" is 'Primary key as UUID';`);
|
|
182
|
+
this.addSql(`comment on column "user_passkey"."created_at" is 'Timestamp when the entity was created';`);
|
|
183
|
+
this.addSql(`comment on column "user_passkey"."updated_at" is 'Timestamp when the entity was last updated';`);
|
|
184
|
+
this.addSql(`comment on column "user_passkey"."user_sub" is 'Reference to the user';`);
|
|
185
|
+
this.addSql(`comment on column "user_passkey"."credential_id" is 'WebAuthn credential ID (base64url encoded)';`);
|
|
186
|
+
this.addSql(`comment on column "user_passkey"."public_key" is 'Public key (base64url encoded)';`);
|
|
187
|
+
this.addSql(`comment on column "user_passkey"."counter" is 'Signature counter for replay attack prevention';`);
|
|
188
|
+
this.addSql(`comment on column "user_passkey"."device_type" is 'Credential device type: singleDevice or multiDevice';`);
|
|
189
|
+
this.addSql(`comment on column "user_passkey"."backed_up" is 'Whether the credential is backed up (synced passkey)';`);
|
|
190
|
+
this.addSql(`comment on column "user_passkey"."transports" is 'Supported authenticator transports (usb, ble, nfc, internal, etc)';`);
|
|
191
|
+
this.addSql(`comment on column "user_passkey"."name" is 'User-defined name for the passkey';`);
|
|
192
|
+
this.addSql(`comment on column "user_passkey"."aaguid" is 'Authenticator Attestation GUID for device identification';`);
|
|
193
|
+
this.addSql(`create index "user_passkey_user_sub_idx" on "user_passkey" ("user_sub");`);
|
|
194
|
+
this.addSql(`create index "user_passkey_credential_id_unique" on "user_passkey" ("credential_id");`);
|
|
195
|
+
this.addSql(`create table "user_terms_consent" ("id" uuid not null, "created_at" timestamptz not null, "updated_at" timestamptz not null, "user_sub" uuid not null, "terms_id" varchar(255) not null, "terms_version" varchar(255) not null, "agreed" boolean not null, "consent_type" varchar(255) not null, "agreed_at" timestamptz not null, primary key ("id"));`);
|
|
196
|
+
this.addSql(`comment on table "user_terms_consent" is 'User consent records for terms of service';`);
|
|
197
|
+
this.addSql(`comment on column "user_terms_consent"."id" is 'Primary key as UUID';`);
|
|
198
|
+
this.addSql(`comment on column "user_terms_consent"."created_at" is 'Timestamp when the entity was created';`);
|
|
199
|
+
this.addSql(`comment on column "user_terms_consent"."updated_at" is 'Timestamp when the entity was last updated';`);
|
|
200
|
+
this.addSql(`comment on column "user_terms_consent"."user_sub" is 'Reference to the user who gave consent';`);
|
|
201
|
+
this.addSql(`comment on column "user_terms_consent"."terms_id" is 'Reference to the terms';`);
|
|
202
|
+
this.addSql(`comment on column "user_terms_consent"."terms_version" is 'Version of the term that was agreed to';`);
|
|
203
|
+
this.addSql(`comment on column "user_terms_consent"."agreed" is 'Whether the user agreed to the term';`);
|
|
204
|
+
this.addSql(`comment on column "user_terms_consent"."consent_type" is 'How consent was obtained: explicit (checkbox) or implicit';`);
|
|
205
|
+
this.addSql(`comment on column "user_terms_consent"."agreed_at" is 'Timestamp when consent was given';`);
|
|
206
|
+
this.addSql(`create index "user_terms_consent_user_sub_index" on "user_terms_consent" ("user_sub");`);
|
|
207
|
+
this.addSql(`create index "user_terms_consent_terms_id_index" on "user_terms_consent" ("terms_id");`);
|
|
208
|
+
this.addSql(`create index "user_terms_consent_user_terms_index" on "user_terms_consent" ("user_sub", "terms_id");`);
|
|
209
|
+
this.addSql(`create table "user_totp" ("id" uuid not null, "created_at" timestamptz not null, "updated_at" timestamptz not null, "user_sub" uuid not null, "secret" varchar(255) not null, "verified" boolean not null default false, "recovery_confirmed" boolean not null default false, primary key ("id"));`);
|
|
210
|
+
this.addSql(`comment on table "user_totp" is 'User TOTP secrets for two-factor authentication';`);
|
|
211
|
+
this.addSql(`comment on column "user_totp"."id" is 'Primary key as UUID';`);
|
|
212
|
+
this.addSql(`comment on column "user_totp"."created_at" is 'Timestamp when the entity was created';`);
|
|
213
|
+
this.addSql(`comment on column "user_totp"."updated_at" is 'Timestamp when the entity was last updated';`);
|
|
214
|
+
this.addSql(`comment on column "user_totp"."user_sub" is 'Reference to the user';`);
|
|
215
|
+
this.addSql(`comment on column "user_totp"."secret" is 'TOTP secret key (base32 encoded)';`);
|
|
216
|
+
this.addSql(`comment on column "user_totp"."verified" is 'Whether the TOTP setup has been verified';`);
|
|
217
|
+
this.addSql(`comment on column "user_totp"."recovery_confirmed" is 'Whether the user has confirmed saving recovery codes';`);
|
|
218
|
+
this.addSql(`alter table "user_totp" add constraint "user_totp_user_unique" unique ("user_sub");`);
|
|
219
|
+
this.addSql(`create table "user_totp_recovery_code" ("id" uuid not null, "created_at" timestamptz not null, "updated_at" timestamptz not null, "user_sub" uuid not null, "code_hash" varchar(255) not null, "used" boolean not null default false, "used_at" timestamptz null, primary key ("id"));`);
|
|
220
|
+
this.addSql(`comment on table "user_totp_recovery_code" is 'One-time recovery codes for TOTP two-factor authentication';`);
|
|
221
|
+
this.addSql(`comment on column "user_totp_recovery_code"."id" is 'Primary key as UUID';`);
|
|
222
|
+
this.addSql(`comment on column "user_totp_recovery_code"."created_at" is 'Timestamp when the entity was created';`);
|
|
223
|
+
this.addSql(`comment on column "user_totp_recovery_code"."updated_at" is 'Timestamp when the entity was last updated';`);
|
|
224
|
+
this.addSql(`comment on column "user_totp_recovery_code"."user_sub" is 'Reference to the user';`);
|
|
225
|
+
this.addSql(`comment on column "user_totp_recovery_code"."code_hash" is 'Versioned recovery code hash';`);
|
|
226
|
+
this.addSql(`comment on column "user_totp_recovery_code"."used" is 'Whether this recovery code has been used';`);
|
|
227
|
+
this.addSql(`comment on column "user_totp_recovery_code"."used_at" is 'Timestamp when this recovery code was used';`);
|
|
228
|
+
this.addSql(`create index "user_totp_recovery_code_user_sub_idx" on "user_totp_recovery_code" ("user_sub");`);
|
|
229
|
+
this.addSql(`alter table "terms_content" add constraint "terms_content_terms_id_foreign" foreign key ("terms_id") references "terms" ("id") on delete cascade;`);
|
|
230
|
+
this.addSql(`alter table "user_consent" add constraint "user_consent_user_sub_foreign" foreign key ("user_sub") references "user" ("sub");`);
|
|
231
|
+
this.addSql(`alter table "user_consent" add constraint "user_consent_client_id_foreign" foreign key ("client_id") references "oauth_client" ("id");`);
|
|
232
|
+
this.addSql(`alter table "revoked_tokens" add constraint "revoked_tokens_client_id_foreign" foreign key ("client_id") references "oauth_client" ("id");`);
|
|
233
|
+
this.addSql(`alter table "revoked_tokens" add constraint "revoked_tokens_user_sub_foreign" foreign key ("user_sub") references "user" ("sub");`);
|
|
234
|
+
this.addSql(`alter table "password_reset" add constraint "password_reset_user_sub_foreign" foreign key ("user_sub") references "user" ("sub");`);
|
|
235
|
+
this.addSql(`alter table "oauth_code" add constraint "oauth_code_client_id_foreign" foreign key ("client_id") references "oauth_client" ("id");`);
|
|
236
|
+
this.addSql(`alter table "oauth_code" add constraint "oauth_code_user_sub_foreign" foreign key ("user_sub") references "user" ("sub");`);
|
|
237
|
+
this.addSql(`alter table "email_verification" add constraint "email_verification_user_sub_foreign" foreign key ("user_sub") references "user" ("sub");`);
|
|
238
|
+
this.addSql(`alter table "user_oauth" add constraint "user_oauth_user_sub_foreign" foreign key ("user_sub") references "user" ("sub");`);
|
|
239
|
+
this.addSql(`alter table "user_passkey" add constraint "user_passkey_user_sub_foreign" foreign key ("user_sub") references "user" ("sub") on delete cascade;`);
|
|
240
|
+
this.addSql(`alter table "user_terms_consent" add constraint "user_terms_consent_user_sub_foreign" foreign key ("user_sub") references "user" ("sub") on delete cascade;`);
|
|
241
|
+
this.addSql(`alter table "user_terms_consent" add constraint "user_terms_consent_terms_id_foreign" foreign key ("terms_id") references "terms" ("id") on delete cascade;`);
|
|
242
|
+
this.addSql(`alter table "user_totp" add constraint "user_totp_user_sub_foreign" foreign key ("user_sub") references "user" ("sub") on delete cascade;`);
|
|
243
|
+
this.addSql(`alter table "user_totp_recovery_code" add constraint "user_totp_recovery_code_user_sub_foreign" foreign key ("user_sub") references "user" ("sub") on delete cascade;`);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
//# sourceMappingURL=Migration20260509171036_initial.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Migration20260509171036_initial.js","sourceRoot":"","sources":["../../../src/migrations/postgres/Migration20260509171036_initial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,MAAM,OAAO,+BAAgC,SAAQ,SAAS;IACnD,EAAE;QACT,IAAI,CAAC,MAAM,CACT,uLAAuL,CACxL,CAAC;QACF,IAAI,CAAC,MAAM,CACT,qEAAqE,CACtE,CAAC;QACF,IAAI,CAAC,MAAM,CACT,uEAAuE,CACxE,CAAC;QACF,IAAI,CAAC,MAAM,CACT,8FAA8F,CAC/F,CAAC;QACF,IAAI,CAAC,MAAM,CACT,mGAAmG,CACpG,CAAC;QACF,IAAI,CAAC,MAAM,CACT,4EAA4E,CAC7E,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,uaAAua,CACxa,CAAC;QACF,IAAI,CAAC,MAAM,CACT,wEAAwE,CACzE,CAAC;QACF,IAAI,CAAC,MAAM,CACT,2EAA2E,CAC5E,CAAC;QACF,IAAI,CAAC,MAAM,CACT,sFAAsF,CACvF,CAAC;QACF,IAAI,CAAC,MAAM,CACT,2FAA2F,CAC5F,CAAC;QACF,IAAI,CAAC,MAAM,CACT,+EAA+E,CAChF,CAAC;QACF,IAAI,CAAC,MAAM,CACT,6EAA6E,CAC9E,CAAC;QACF,IAAI,CAAC,MAAM,CACT,6EAA6E,CAC9E,CAAC;QACF,IAAI,CAAC,MAAM,CACT,wFAAwF,CACzF,CAAC;QACF,IAAI,CAAC,MAAM,CACT,yFAAyF,CAC1F,CAAC;QACF,IAAI,CAAC,MAAM,CACT,8FAA8F,CAC/F,CAAC;QACF,IAAI,CAAC,MAAM,CACT,+EAA+E,CAChF,CAAC;QACF,IAAI,CAAC,MAAM,CACT,4FAA4F,CAC7F,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,4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,4FAA4F,CAC7F,CAAC;QACF,IAAI,CAAC,MAAM,CACT,mGAAmG,CACpG,CAAC;QACF,IAAI,CAAC,MAAM,CACT,wGAAwG,CACzG,CAAC;QACF,IAAI,CAAC,MAAM,CACT,gGAAgG,CACjG,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,mJAAmJ,CACpJ,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,+HAA+H,CAChI,CAAC;QACF,IAAI,CAAC,MAAM,CACT,wIAAwI,CACzI,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,4IAA4I,CAC7I,CAAC;QACF,IAAI,CAAC,MAAM,CACT,mIAAmI,CACpI,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,mIAAmI,CACpI,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,oIAAoI,CACrI,CAAC;QACF,IAAI,CAAC,MAAM,CACT,2HAA2H,CAC5H,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,2IAA2I,CAC5I,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,2HAA2H,CAC5H,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,iJAAiJ,CAClJ,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,6JAA6J,CAC9J,CAAC;QACF,IAAI,CAAC,MAAM,CACT,6JAA6J,CAC9J,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,2IAA2I,CAC5I,CAAC;QAEF,IAAI,CAAC,MAAM,CACT,uKAAuK,CACxK,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/migrations/postgres/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAEvF,eAAO,MAAM,mBAAmB,4CAAoC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/migrations/postgres/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAEvF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,+BAA+B,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Migration20260509171226_initial.d.ts","sourceRoot":"","sources":["../../../src/migrations/sqlite/Migration20260509171226_initial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,qBAAa,+BAAgC,SAAQ,SAAS;IACnD,EAAE,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAwLpC"}
|