0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-30 20:33:54 -05:00

refactor(schemas): specify tenants table schema (#4155)

This commit is contained in:
Gao Sun 2023-07-12 13:56:39 +08:00 committed by GitHub
parent b3e55d1ce6
commit 6b54d9190d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 6 deletions

View file

@ -86,7 +86,7 @@
"@logto/phrases": "workspace:^1.4.1",
"@logto/phrases-ui": "workspace:^1.2.0",
"@logto/shared": "workspace:^2.0.0",
"@withtyped/server": "^0.12.5"
"@withtyped/server": "^0.12.7"
},
"peerDependencies": {
"zod": "^3.20.2"

View file

@ -8,7 +8,8 @@ export enum TenantTag {
Production = 'production',
}
export const Tenants = createModel(/* sql */ `
export const Tenants = createModel(
/* Sql */ `
/* init_order = 0 */
create table tenants (
id varchar(21) not null,
@ -22,7 +23,9 @@ export const Tenants = createModel(/* sql */ `
unique (db_user)
);
/* no_after_each */
`)
`,
'public'
)
.extend('tag', z.nativeEnum(TenantTag))
.extend('createdAt', { readonly: true });

View file

@ -3547,8 +3547,8 @@ importers:
specifier: workspace:^2.0.0
version: link:../shared
'@withtyped/server':
specifier: ^0.12.5
version: 0.12.5(zod@3.20.2)
specifier: ^0.12.7
version: 0.12.7(zod@3.20.2)
zod:
specifier: ^3.20.2
version: 3.20.2
@ -7163,7 +7163,7 @@ packages:
resolution: {integrity: sha512-4XsXlCC0uZHcfazV09/4YKo4koqvSzQlkPUAToTp/WHpb6h2XDOJh5/hi55LXL4zp0PCcgpErKRxFCtgXCc6WQ==}
dependencies:
'@logto/client': 2.2.0
'@silverhand/essentials': 2.6.2
'@silverhand/essentials': 2.7.0
js-base64: 3.7.5
dev: true
@ -9826,6 +9826,16 @@ packages:
'@withtyped/shared': 0.2.2
zod: 3.20.2
/@withtyped/server@0.12.7(zod@3.20.2):
resolution: {integrity: sha512-NNT78ZZmSZiEosxI3iW/kVx1KEG5vetvpEXNl0Gy58OlOnI8l/7h8Q//JZJ268xWOKyaNI4KrngTRtL5uvZu9Q==}
peerDependencies:
zod: ^3.19.1
dependencies:
'@silverhand/essentials': 2.7.0
'@withtyped/shared': 0.2.2
zod: 3.20.2
dev: false
/@withtyped/shared@0.2.2:
resolution: {integrity: sha512-Vpcj12NqaoZ8M5Z/1kffheI9FBZEm9goed0THmgTcMKXLHjXSRbMZMp0olVxovEgaTIAydshqJOQUXKZMctIZw==}