alepha 0.6.10 → 0.7.1
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/README.md +14 -3
- package/assets/logo.png +0 -0
- package/cache.cjs +0 -1
- package/cache.d.ts +30 -13
- package/cache.js +0 -1
- package/core.cjs +0 -1
- package/core.d.ts +465 -183
- package/core.js +0 -1
- package/datetime.cjs +0 -1
- package/datetime.d.ts +32 -31
- package/datetime.js +0 -1
- package/lock.cjs +0 -1
- package/lock.d.ts +2 -2
- package/lock.js +0 -1
- package/package.json +55 -47
- package/postgres.cjs +0 -1
- package/postgres.d.ts +3276 -124
- package/postgres.js +0 -1
- package/queue.cjs +0 -1
- package/queue.d.ts +2 -2
- package/queue.js +0 -1
- package/react/auth.cjs +0 -1
- package/react/auth.d.ts +40 -32
- package/react/auth.js +0 -1
- package/react.cjs +0 -1
- package/react.d.ts +417 -234
- package/react.js +0 -1
- package/redis.cjs +0 -1
- package/redis.js +0 -1
- package/retry.cjs +12 -0
- package/retry.d.ts +68 -0
- package/retry.js +1 -0
- package/scheduler.cjs +0 -1
- package/scheduler.js +0 -1
- package/security.cjs +0 -1
- package/security.d.ts +71 -17
- package/security.js +0 -1
- package/server/cookies.cjs +0 -1
- package/server/cookies.d.ts +1 -1
- package/server/cookies.js +0 -1
- package/server/metrics.cjs +0 -1
- package/server/metrics.d.ts +1 -1
- package/server/metrics.js +0 -1
- package/server/proxy.cjs +0 -1
- package/server/proxy.d.ts +1 -35
- package/server/proxy.js +0 -1
- package/server/static.cjs +0 -1
- package/server/static.d.ts +6 -0
- package/server/static.js +0 -1
- package/server/swagger.cjs +0 -1
- package/server/swagger.d.ts +1 -0
- package/server/swagger.js +0 -1
- package/server.cjs +0 -1
- package/server.d.ts +639 -346
- package/server.js +0 -1
- package/src/retry.ts +1 -0
- package/topic.cjs +0 -1
- package/topic.d.ts +3 -3
- package/topic.js +0 -1
- package/vite.cjs +0 -1
- package/vite.d.ts +29 -30
- package/vite.js +0 -1
- package/cache.cjs.map +0 -1
- package/cache.js.map +0 -1
- package/core.cjs.map +0 -1
- package/core.js.map +0 -1
- package/datetime.cjs.map +0 -1
- package/datetime.js.map +0 -1
- package/lock.cjs.map +0 -1
- package/lock.js.map +0 -1
- package/postgres.cjs.map +0 -1
- package/postgres.js.map +0 -1
- package/queue.cjs.map +0 -1
- package/queue.js.map +0 -1
- package/react/auth.cjs.map +0 -1
- package/react/auth.js.map +0 -1
- package/react.cjs.map +0 -1
- package/react.js.map +0 -1
- package/redis.cjs.map +0 -1
- package/redis.js.map +0 -1
- package/scheduler.cjs.map +0 -1
- package/scheduler.js.map +0 -1
- package/security.cjs.map +0 -1
- package/security.js.map +0 -1
- package/server/cookies.cjs.map +0 -1
- package/server/cookies.js.map +0 -1
- package/server/metrics.cjs.map +0 -1
- package/server/metrics.js.map +0 -1
- package/server/proxy.cjs.map +0 -1
- package/server/proxy.js.map +0 -1
- package/server/static.cjs.map +0 -1
- package/server/static.js.map +0 -1
- package/server/swagger.cjs.map +0 -1
- package/server/swagger.js.map +0 -1
- package/server.cjs.map +0 -1
- package/server.js.map +0 -1
- package/topic.cjs.map +0 -1
- package/topic.js.map +0 -1
- package/vite.cjs.map +0 -1
- package/vite.js.map +0 -1
package/postgres.d.ts
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import * as _alepha_core from '@alepha/core';
|
|
2
2
|
import { TObject as TObject$1, Static as Static$1, Alepha, KIND, OPTIONS } from '@alepha/core';
|
|
3
3
|
import * as _sinclair_typebox from '@sinclair/typebox';
|
|
4
|
-
import { TObject,
|
|
4
|
+
import { TObject, TSchema, ObjectOptions, Kind, TProperties, Evaluate, TReadonly, TOptional, Static, TAdditionalProperties, OptionalKind, TArray, TIntersect, TRecord, TBoolean, TInteger, TOptionalWithFlag, IntegerOptions, NumberOptions, StringOptions } from '@sinclair/typebox';
|
|
5
5
|
import * as drizzle_orm from 'drizzle-orm';
|
|
6
|
-
import { TableConfig, SQLWrapper, SQL
|
|
6
|
+
import { TableConfig, BuildColumns, BuildExtraConfigColumns as BuildExtraConfigColumns$1, SQLWrapper, SQL } from 'drizzle-orm';
|
|
7
7
|
export { sql } from 'drizzle-orm';
|
|
8
8
|
import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
|
|
9
|
-
import { PgSequenceOptions, AnyPgTable, AnyPgColumn, UpdateDeleteAction,
|
|
9
|
+
import { PgSequenceOptions, AnyPgTable, AnyPgColumn, UpdateDeleteAction, PgTableWithColumns, PgColumnBuilderBase, PgTableExtraConfigValue, PgDatabase, TableConfig as TableConfig$1, PgColumn, PgTransaction, PgTransactionConfig, LockStrength, LockConfig, PgInsertValue, PgSelectJoinFn } from 'drizzle-orm/pg-core';
|
|
10
10
|
export * from 'drizzle-orm/pg-core';
|
|
11
|
-
import { PgTransactionConfig as PgTransactionConfig$1 } from 'drizzle-orm/pg-core/session';
|
|
12
11
|
import { BuildExtraConfigColumns } from 'drizzle-orm/column-builder';
|
|
13
|
-
import
|
|
12
|
+
import * as _alepha_retry from '@alepha/retry';
|
|
13
|
+
import { PgTransactionConfig as PgTransactionConfig$1 } from 'drizzle-orm/pg-core/session';
|
|
14
|
+
import { LibSQLDatabase } from 'drizzle-orm/libsql';
|
|
15
|
+
import { MySql2Database } from 'drizzle-orm/mysql2';
|
|
16
|
+
import { SingleStoreDriverDatabase } from 'drizzle-orm/singlestore';
|
|
17
|
+
import { ConnectionOptions } from 'tls';
|
|
18
|
+
import * as zod from 'zod';
|
|
19
|
+
import { TypeOf } from 'zod';
|
|
14
20
|
import * as _alepha_lock from '@alepha/lock';
|
|
15
21
|
import { MigrationConfig } from 'drizzle-orm/migrator';
|
|
16
22
|
import { NodePgDatabase } from 'drizzle-orm/node-postgres';
|
|
@@ -28,10 +34,13 @@ declare const PG_CREATED_AT: unique symbol;
|
|
|
28
34
|
declare const PG_UPDATED_AT: unique symbol;
|
|
29
35
|
declare const PG_VERSION: unique symbol;
|
|
30
36
|
declare const PG_IDENTITY: unique symbol;
|
|
31
|
-
declare const PG_SERIAL: unique symbol;
|
|
32
37
|
declare const PG_MANY: unique symbol;
|
|
33
38
|
declare const PG_ONE: unique symbol;
|
|
34
39
|
declare const PG_REF: unique symbol;
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated Use `PG_IDENTITY` instead.
|
|
42
|
+
*/
|
|
43
|
+
declare const PG_SERIAL: unique symbol;
|
|
35
44
|
type PgDefault = typeof PG_DEFAULT;
|
|
36
45
|
type PgMany = typeof PG_MANY;
|
|
37
46
|
type PgRef = typeof PG_REF;
|
|
@@ -43,10 +52,13 @@ type PgSymbols = {
|
|
|
43
52
|
[PG_UPDATED_AT]: {};
|
|
44
53
|
[PG_VERSION]: {};
|
|
45
54
|
[PG_IDENTITY]: PgIdentityOptions;
|
|
46
|
-
[PG_SERIAL]: {};
|
|
47
55
|
[PG_MANY]: PgManyOptions;
|
|
48
56
|
[PG_ONE]: PgManyOptions;
|
|
49
57
|
[PG_REF]: PgRefOptions;
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated Use `PG_IDENTITY` instead.
|
|
60
|
+
*/
|
|
61
|
+
[PG_SERIAL]: {};
|
|
50
62
|
};
|
|
51
63
|
type PgSymbolKeys = keyof PgSymbols;
|
|
52
64
|
type PgIdentityOptions = {
|
|
@@ -67,27 +79,41 @@ interface PgRefOptions {
|
|
|
67
79
|
};
|
|
68
80
|
}
|
|
69
81
|
|
|
70
|
-
interface EntityDescriptorOptions<T extends TObject, Keys = keyof Static<T>> {
|
|
71
|
-
name: string;
|
|
72
|
-
schema: T;
|
|
73
|
-
indexes?: (Keys | {
|
|
74
|
-
column: Keys;
|
|
75
|
-
unique?: boolean;
|
|
76
|
-
name?: string;
|
|
77
|
-
})[];
|
|
78
|
-
foreignKeys?: {
|
|
79
|
-
columns: Keys[];
|
|
80
|
-
foreignTable: string;
|
|
81
|
-
foreignColumns: Keys[];
|
|
82
|
-
onUpdate?: "cascade" | "restrict" | "no action" | "set null" | "set default";
|
|
83
|
-
onDelete?: "cascade" | "restrict" | "no action" | "set null" | "set default";
|
|
84
|
-
}[];
|
|
85
|
-
config?: PgTableExtraConfigValue[];
|
|
86
|
-
}
|
|
87
82
|
/**
|
|
88
|
-
*
|
|
83
|
+
* Fork of the original typebox schema "TObject".
|
|
84
|
+
*
|
|
85
|
+
* Expect some breaking changes in the future...
|
|
89
86
|
*/
|
|
90
|
-
|
|
87
|
+
interface TInsertObject<T extends TObject> extends TSchema, ObjectOptions {
|
|
88
|
+
[Kind]: "Object";
|
|
89
|
+
static: ObjectStatic<{
|
|
90
|
+
[K in keyof T["properties"] as T["properties"][K] extends {
|
|
91
|
+
[PG_DEFAULT]: any;
|
|
92
|
+
} ? never : K]: T["properties"][K];
|
|
93
|
+
}, this["params"]>;
|
|
94
|
+
additionalProperties?: TAdditionalProperties;
|
|
95
|
+
type: "object";
|
|
96
|
+
required?: string[];
|
|
97
|
+
properties: {
|
|
98
|
+
[K in keyof T["properties"] as T["properties"][K] extends {
|
|
99
|
+
[PG_DEFAULT]: any;
|
|
100
|
+
} ? never : K]: T["properties"][K];
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
type ReadonlyOptionalPropertyKeys<T extends TProperties> = {
|
|
104
|
+
[K in keyof T]: T[K] extends TReadonly<TSchema> ? T[K] extends TOptional<T[K]> ? K : never : never;
|
|
105
|
+
}[keyof T];
|
|
106
|
+
type ReadonlyPropertyKeys<T extends TProperties> = {
|
|
107
|
+
[K in keyof T]: T[K] extends TReadonly<TSchema> ? T[K] extends TOptional<T[K]> ? never : K : never;
|
|
108
|
+
}[keyof T];
|
|
109
|
+
type OptionalPropertyKeys<T extends TProperties> = {
|
|
110
|
+
[K in keyof T]: T[K] extends TOptional<TSchema> ? T[K] extends TReadonly<T[K]> ? never : K : never;
|
|
111
|
+
}[keyof T];
|
|
112
|
+
type RequiredPropertyKeys<T extends TProperties> = keyof Omit<T, ReadonlyOptionalPropertyKeys<T> | ReadonlyPropertyKeys<T> | OptionalPropertyKeys<T>>;
|
|
113
|
+
type ObjectStaticProperties<T extends TProperties, R extends Record<keyof any, unknown>> = Evaluate<Readonly<Partial<Pick<R, ReadonlyOptionalPropertyKeys<T>>>> & Readonly<Pick<R, ReadonlyPropertyKeys<T>>> & Partial<Pick<R, OptionalPropertyKeys<T>>> & Required<Pick<R, RequiredPropertyKeys<T>>>>;
|
|
114
|
+
type ObjectStatic<T extends TProperties, P extends unknown[]> = ObjectStaticProperties<T, {
|
|
115
|
+
[K in keyof T]: Static<T[K], P>;
|
|
116
|
+
}>;
|
|
91
117
|
|
|
92
118
|
/**
|
|
93
119
|
* Convert a schema to columns.
|
|
@@ -95,7 +121,6 @@ declare const $entity: <T extends TObject>(options: EntityDescriptorOptions<T>)
|
|
|
95
121
|
* @param schema
|
|
96
122
|
*/
|
|
97
123
|
declare const schemaToColumns: <T extends TObject$1>(schema: T) => FromSchema<T>;
|
|
98
|
-
declare const fromSchema: <T extends TObject$1>(schema: T) => FromSchema<T>;
|
|
99
124
|
/**
|
|
100
125
|
* Convert a schema to columns.
|
|
101
126
|
*/
|
|
@@ -109,9 +134,77 @@ type FromSchema<T extends TObject$1> = {
|
|
|
109
134
|
* A table with columns and schema.
|
|
110
135
|
*/
|
|
111
136
|
type PgTableWithColumnsAndSchema<T extends TableConfig, R extends TObject$1> = PgTableWithColumns<T> & {
|
|
112
|
-
|
|
137
|
+
get $table(): PgTableWithColumns<T>;
|
|
138
|
+
get $schema(): R;
|
|
139
|
+
get $insertSchema(): TInsertObject<R>;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Create a table with a json schema.
|
|
144
|
+
*
|
|
145
|
+
* @param name The name of the table.
|
|
146
|
+
* @param schema The json schema of the table.
|
|
147
|
+
* @param extraConfig Extra configuration for the table.
|
|
148
|
+
*/
|
|
149
|
+
declare const pgTableSchema: <TTableName extends string, TSchema extends TObject, TColumnsMap extends FromSchema<TSchema>>(name: TTableName, schema: TSchema, extraConfig?: (self: BuildExtraConfigColumns<TTableName, TColumnsMap, "pg">) => PgTableExtraConfigValue[]) => PgTableWithColumnsAndSchema<PgTableConfig<TTableName, TSchema, TColumnsMap>, TSchema>;
|
|
150
|
+
type PgTableConfig<TTableName extends string, TSchema extends TObject, TColumnsMap extends FromSchema<TSchema>> = {
|
|
151
|
+
name: TTableName;
|
|
152
|
+
schema: any;
|
|
153
|
+
columns: BuildColumns<TTableName, TColumnsMap, "pg">;
|
|
154
|
+
dialect: "pg";
|
|
113
155
|
};
|
|
114
156
|
|
|
157
|
+
interface EntityDescriptorOptions<TTableName extends string, T extends TObject, Keys = keyof Static<T>> {
|
|
158
|
+
/**
|
|
159
|
+
* The name of the table. This is the name that will be used in the database.
|
|
160
|
+
* @example
|
|
161
|
+
* name: "user"
|
|
162
|
+
*/
|
|
163
|
+
name: TTableName;
|
|
164
|
+
/**
|
|
165
|
+
* The schema of the table. This is a TypeBox schema that describes the columns and their types.
|
|
166
|
+
* @example
|
|
167
|
+
* schema: t.object({
|
|
168
|
+
* id: t.uuid(),
|
|
169
|
+
* name: t.string(),
|
|
170
|
+
* email: t.string(),
|
|
171
|
+
* phoneNumber: t.string(),
|
|
172
|
+
* })
|
|
173
|
+
*/
|
|
174
|
+
schema: T;
|
|
175
|
+
/**
|
|
176
|
+
* The indexes to create for the table. This can be a string or an object with the column name and options.
|
|
177
|
+
* @example
|
|
178
|
+
* indexes: ["name", { column: "email", unique: true }]
|
|
179
|
+
*/
|
|
180
|
+
indexes?: (Keys | {
|
|
181
|
+
column: Keys;
|
|
182
|
+
unique?: boolean;
|
|
183
|
+
name?: string;
|
|
184
|
+
} | {
|
|
185
|
+
columns: Keys[];
|
|
186
|
+
unique?: boolean;
|
|
187
|
+
name?: string;
|
|
188
|
+
})[];
|
|
189
|
+
relations?: Record<string, {
|
|
190
|
+
type: "one" | "many";
|
|
191
|
+
table: () => any;
|
|
192
|
+
foreignColumn?: keyof Static<T>;
|
|
193
|
+
}>;
|
|
194
|
+
/**
|
|
195
|
+
* Extra configuration for the table. See drizzle-orm documentation for more details.
|
|
196
|
+
*
|
|
197
|
+
* @param self The table descriptor.
|
|
198
|
+
* @returns The extra configuration for the table.
|
|
199
|
+
*/
|
|
200
|
+
config?: (self: BuildExtraConfigColumns$1<string, FromSchema<T>, "pg">) => PgTableExtraConfigValue[];
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Creates a table descriptor for drizzle-orm.
|
|
204
|
+
*/
|
|
205
|
+
declare const $entity: <TTableName extends string, TSchema extends TObject, TColumnsMap extends FromSchema<TSchema>>(options: EntityDescriptorOptions<TTableName, TSchema>) => PgTableWithColumnsAndSchema<PgTableConfig<TTableName, TSchema, TColumnsMap>, TSchema>;
|
|
206
|
+
type Entity<T extends TObject> = PgTableWithColumnsAndSchema<PgTableConfig<string, T, FromSchema<T>>, T>;
|
|
207
|
+
|
|
115
208
|
type SQLLike = SQLWrapper | string;
|
|
116
209
|
declare class PostgresProvider {
|
|
117
210
|
constructor();
|
|
@@ -121,40 +214,8 @@ declare class PostgresProvider {
|
|
|
121
214
|
get db(): PgDatabase<any>;
|
|
122
215
|
get schema(): string;
|
|
123
216
|
get dialect(): string;
|
|
124
|
-
execute(
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Fork of the original typebox schema "TObject".
|
|
129
|
-
*
|
|
130
|
-
* Expect some breaking changes in the future...
|
|
131
|
-
*/
|
|
132
|
-
interface TInsertObject<T extends TObject> extends TSchema, ObjectOptions {
|
|
133
|
-
[Kind]: "Object";
|
|
134
|
-
static: ObjectStatic<T["properties"], this["params"]>;
|
|
135
|
-
additionalProperties?: TAdditionalProperties;
|
|
136
|
-
type: "object";
|
|
137
|
-
required?: string[];
|
|
138
|
-
properties: {
|
|
139
|
-
[K in keyof T["properties"] as T["properties"][K] extends {
|
|
140
|
-
[PG_DEFAULT]: any;
|
|
141
|
-
} ? never : K]: T["properties"][K];
|
|
142
|
-
};
|
|
217
|
+
execute(_query: SQLLike): Promise<any[]>;
|
|
143
218
|
}
|
|
144
|
-
type ReadonlyOptionalPropertyKeys<T extends TProperties> = {
|
|
145
|
-
[K in keyof T]: T[K] extends TReadonly<TSchema> ? T[K] extends TOptional<T[K]> ? K : never : never;
|
|
146
|
-
}[keyof T];
|
|
147
|
-
type ReadonlyPropertyKeys<T extends TProperties> = {
|
|
148
|
-
[K in keyof T]: T[K] extends TReadonly<TSchema> ? T[K] extends TOptional<T[K]> ? never : K : never;
|
|
149
|
-
}[keyof T];
|
|
150
|
-
type OptionalPropertyKeys<T extends TProperties> = {
|
|
151
|
-
[K in keyof T]: T[K] extends TOptional<TSchema> ? T[K] extends TReadonly<T[K]> ? never : K : never;
|
|
152
|
-
}[keyof T];
|
|
153
|
-
type RequiredPropertyKeys<T extends TProperties> = keyof Omit<T, ReadonlyOptionalPropertyKeys<T> | ReadonlyPropertyKeys<T> | OptionalPropertyKeys<T>>;
|
|
154
|
-
type ObjectStaticProperties<T extends TProperties, R extends Record<keyof any, unknown>> = Evaluate<Readonly<Partial<Pick<R, ReadonlyOptionalPropertyKeys<T>>>> & Readonly<Pick<R, ReadonlyPropertyKeys<T>>> & Partial<Pick<R, OptionalPropertyKeys<T>>> & Required<Pick<R, RequiredPropertyKeys<T>>>>;
|
|
155
|
-
type ObjectStatic<T extends TProperties, P extends unknown[]> = ObjectStaticProperties<T, {
|
|
156
|
-
[K in keyof T]: Static<T[K], P>;
|
|
157
|
-
}>;
|
|
158
219
|
|
|
159
220
|
/**
|
|
160
221
|
* Replaces all null values in an object with undefined.
|
|
@@ -651,7 +712,7 @@ type PgQueryWith<T extends TObject | TArray> = true | {
|
|
|
651
712
|
};
|
|
652
713
|
|
|
653
714
|
declare const pageQuerySchema: _sinclair_typebox.TObject<{
|
|
654
|
-
page: _sinclair_typebox.TOptional<_sinclair_typebox.
|
|
715
|
+
page: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
655
716
|
size: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
656
717
|
sort: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
657
718
|
}>;
|
|
@@ -676,6 +737,9 @@ type TPage<T extends TObject | TIntersect | TRecord> = TObject<{
|
|
|
676
737
|
page: TObject<{
|
|
677
738
|
number: TInteger;
|
|
678
739
|
size: TInteger;
|
|
740
|
+
totalElements: TOptionalWithFlag<TInteger, true>;
|
|
741
|
+
queryDuration: TOptionalWithFlag<TInteger, true>;
|
|
742
|
+
countDuration: TOptionalWithFlag<TInteger, true>;
|
|
679
743
|
}>;
|
|
680
744
|
}>;
|
|
681
745
|
/**
|
|
@@ -690,6 +754,9 @@ type Page<T> = {
|
|
|
690
754
|
page: {
|
|
691
755
|
number: number;
|
|
692
756
|
size: number;
|
|
757
|
+
totalElements?: number;
|
|
758
|
+
queryDuration?: number;
|
|
759
|
+
countDuration?: number;
|
|
693
760
|
};
|
|
694
761
|
};
|
|
695
762
|
|
|
@@ -699,7 +766,10 @@ type Page<T> = {
|
|
|
699
766
|
declare class Repository<TTable extends PgTableWithColumns<TableConfig$1>, TTableSchema extends TObject> {
|
|
700
767
|
readonly provider: PostgresProvider;
|
|
701
768
|
protected readonly alepha: Alepha;
|
|
702
|
-
|
|
769
|
+
protected readonly env: {
|
|
770
|
+
POSTGRES_PAGINATION_COUNT_ENABLED: boolean;
|
|
771
|
+
};
|
|
772
|
+
static of: <TEntity extends TableConfig$1, TSchema extends TObject>(opts: PgTableWithColumnsAndSchema<TEntity, TSchema>) => (new () => Repository<PgTableWithColumns<TEntity>, TSchema>);
|
|
703
773
|
/**
|
|
704
774
|
* Register Repository as a valid descriptor.
|
|
705
775
|
* - Required for $repository to work.
|
|
@@ -1116,7 +1186,7 @@ type TransactionContext = PgTransaction<any, any, any>;
|
|
|
1116
1186
|
/**
|
|
1117
1187
|
* Creates a transaction descriptor.
|
|
1118
1188
|
*/
|
|
1119
|
-
declare const $transaction: <T extends any[], R>(opts: TransactionDescriptorOptions<T, R>) => (...
|
|
1189
|
+
declare const $transaction: <T extends any[], R>(opts: TransactionDescriptorOptions<T, R>) => _alepha_retry.RetryDescriptor<(...args: T) => Promise<R>>;
|
|
1120
1190
|
|
|
1121
1191
|
declare class EntityNotFoundError extends Error {
|
|
1122
1192
|
readonly code = "ERR_RESOURCE_NOTFOUND";
|
|
@@ -1124,35 +1194,3096 @@ declare class EntityNotFoundError extends Error {
|
|
|
1124
1194
|
constructor(entityName: string);
|
|
1125
1195
|
}
|
|
1126
1196
|
|
|
1197
|
+
declare const prefixes: readonly ["index", "timestamp", "supabase", "unix", "none"];
|
|
1198
|
+
type Prefix = (typeof prefixes)[number];
|
|
1199
|
+
declare const casingTypes: readonly ["snake_case", "camelCase"];
|
|
1200
|
+
type CasingType = (typeof casingTypes)[number];
|
|
1201
|
+
declare const drivers: readonly ["d1-http", "expo", "aws-data-api", "pglite", "durable-sqlite"];
|
|
1202
|
+
type Driver = (typeof drivers)[number];
|
|
1203
|
+
|
|
1204
|
+
declare const dialects: readonly ["postgresql", "mysql", "sqlite", "turso", "singlestore", "gel"];
|
|
1205
|
+
type Dialect = (typeof dialects)[number];
|
|
1206
|
+
|
|
1207
|
+
type SslOptions = {
|
|
1208
|
+
pfx?: string;
|
|
1209
|
+
key?: string;
|
|
1210
|
+
passphrase?: string;
|
|
1211
|
+
cert?: string;
|
|
1212
|
+
ca?: string | string[];
|
|
1213
|
+
crl?: string | string[];
|
|
1214
|
+
ciphers?: string;
|
|
1215
|
+
rejectUnauthorized?: boolean;
|
|
1216
|
+
};
|
|
1217
|
+
type Verify<T, U extends T> = U;
|
|
1127
1218
|
/**
|
|
1128
|
-
*
|
|
1219
|
+
* **You are currently using version 0.21.0+ of drizzle-kit. If you have just upgraded to this version, please make sure to read the changelog to understand what changes have been made and what
|
|
1220
|
+
* adjustments may be necessary for you. See https://orm.drizzle.team/kit-docs/upgrade-21#how-to-migrate-to-0210**
|
|
1129
1221
|
*
|
|
1130
|
-
*
|
|
1131
|
-
*
|
|
1132
|
-
*
|
|
1133
|
-
|
|
1134
|
-
declare const pgTableSchema: <TTableName extends string, TSchema extends TObject, TColumnsMap extends FromSchema<TSchema>>(name: TTableName, schema: TSchema, extraConfig?: (self: BuildExtraConfigColumns<TTableName, TColumnsMap, "pg">) => PgTableExtraConfigValue$1[]) => PgTableWithColumnsAndSchema<PgTableConfig<TTableName, TSchema, TColumnsMap>, TSchema>;
|
|
1135
|
-
/**
|
|
1136
|
-
* @alias pgTableSchema
|
|
1137
|
-
*/
|
|
1138
|
-
declare const table: <TTableName extends string, TSchema extends TObject, TColumnsMap extends FromSchema<TSchema>>(name: TTableName, schema: TSchema, extraConfig?: (self: BuildExtraConfigColumns<TTableName, TColumnsMap, "pg">) => PgTableExtraConfigValue$1[]) => PgTableWithColumnsAndSchema<PgTableConfig<TTableName, TSchema, TColumnsMap>, TSchema>;
|
|
1139
|
-
declare const $table: <TTableName extends string, TSchema extends TObject, TColumnsMap extends FromSchema<TSchema>>(name: TTableName, schema: TSchema, extraConfig?: (self: BuildExtraConfigColumns<TTableName, TColumnsMap, "pg">) => PgTableExtraConfigValue$1[]) => PgTableWithColumnsAndSchema<PgTableConfig<TTableName, TSchema, TColumnsMap>, TSchema>;
|
|
1140
|
-
declare const table2: <TTableName extends string, TSchema extends TObject, TColumnsMap extends FromSchema<TSchema>>(name: TTableName, schema: TSchema, extraConfig?: (self: BuildExtraConfigColumns<TTableName, TColumnsMap, "pg">) => PgTableExtraConfigValue$1[]) => PgTableWithColumnsAndSchema<PgTableConfig<TTableName, TSchema, TColumnsMap>, TSchema>;
|
|
1141
|
-
/**
|
|
1222
|
+
* **Config** usage:
|
|
1223
|
+
*
|
|
1224
|
+
* `dialect` - mandatory and is responsible for explicitly providing a databse dialect you are using for all the commands
|
|
1225
|
+
* *Possible values*: `postgresql`, `mysql`, `sqlite`, `singlestore
|
|
1142
1226
|
*
|
|
1227
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#dialect
|
|
1228
|
+
*
|
|
1229
|
+
* ---
|
|
1230
|
+
* `schema` - param lets you define where your schema file/files live.
|
|
1231
|
+
* You can have as many separate schema files as you want and define paths to them using glob or array of globs syntax.
|
|
1232
|
+
*
|
|
1233
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#schema
|
|
1234
|
+
*
|
|
1235
|
+
* ---
|
|
1236
|
+
* `out` - allows you to define the folder for your migrations and a folder, where drizzle will introspect the schema and relations
|
|
1237
|
+
*
|
|
1238
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#out
|
|
1239
|
+
*
|
|
1240
|
+
* ---
|
|
1241
|
+
* `driver` - optional param that is responsible for explicitly providing a driver to use when accessing a database
|
|
1242
|
+
* *Possible values*: `aws-data-api`, `d1-http`, `expo`, `turso`, `pglite`
|
|
1243
|
+
* If you don't use AWS Data API, D1, Turso or Expo - ypu don't need this driver. You can check a driver strategy choice here: https://orm.drizzle.team/kit-docs/upgrade-21
|
|
1244
|
+
*
|
|
1245
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#driver
|
|
1246
|
+
*
|
|
1247
|
+
* ---
|
|
1248
|
+
*
|
|
1249
|
+
* `dbCredentials` - an object to define your connection to the database. For more info please check the docs
|
|
1250
|
+
*
|
|
1251
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#dbcredentials
|
|
1252
|
+
*
|
|
1253
|
+
* ---
|
|
1254
|
+
*
|
|
1255
|
+
* `migrations` - param let’s use specify custom table and schema(PostgreSQL only) for migrations.
|
|
1256
|
+
* By default, all information about executed migrations will be stored in the database inside
|
|
1257
|
+
* the `__drizzle_migrations` table, and for PostgreSQL, inside the drizzle schema.
|
|
1258
|
+
* However, you can configure where to store those records.
|
|
1259
|
+
*
|
|
1260
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#migrations
|
|
1261
|
+
*
|
|
1262
|
+
* ---
|
|
1263
|
+
*
|
|
1264
|
+
* `breakpoints` - param lets you enable/disable SQL statement breakpoints in generated migrations.
|
|
1265
|
+
* It’s optional and true by default, it’s necessary to properly apply migrations on databases,
|
|
1266
|
+
* that do not support multiple DDL alternation statements in one transaction(MySQL, SQLite, SingleStore) and
|
|
1267
|
+
* Drizzle ORM has to apply them sequentially one by one.
|
|
1268
|
+
*
|
|
1269
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#breakpoints
|
|
1270
|
+
*
|
|
1271
|
+
* ---
|
|
1272
|
+
*
|
|
1273
|
+
* `tablesFilters` - param lets you filter tables with glob syntax for db push command.
|
|
1274
|
+
* It’s useful when you have only one database avaialable for several separate projects with separate sql schemas.
|
|
1275
|
+
*
|
|
1276
|
+
* How to define multi-project tables with Drizzle ORM — see https://orm.drizzle.team/docs/goodies#multi-project-schema
|
|
1277
|
+
*
|
|
1278
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#tablesfilters
|
|
1279
|
+
*
|
|
1280
|
+
* ---
|
|
1281
|
+
*
|
|
1282
|
+
* `schemaFilter` - parameter allows you to define which schema in PostgreSQL should be used for either introspect or push commands.
|
|
1283
|
+
* This parameter accepts a single schema as a string or an array of schemas as strings.
|
|
1284
|
+
* No glob pattern is supported here. By default, drizzle will use the public schema for both commands,
|
|
1285
|
+
* but you can add any schema you need.
|
|
1286
|
+
*
|
|
1287
|
+
* For example, having schemaFilter: ["my_schema"] will only look for tables in both the database and
|
|
1288
|
+
* drizzle schema that are a part of the my_schema schema.
|
|
1289
|
+
*
|
|
1290
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#schemafilter
|
|
1291
|
+
*
|
|
1292
|
+
* ---
|
|
1293
|
+
*
|
|
1294
|
+
* `verbose` - command is used for drizzle-kit push commands and prints all statements that will be executed.
|
|
1295
|
+
*
|
|
1296
|
+
* > Note: This command will only print the statements that should be executed.
|
|
1297
|
+
* To approve them before applying, please refer to the `strict` command.
|
|
1298
|
+
*
|
|
1299
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#verbose
|
|
1300
|
+
*
|
|
1301
|
+
* ---
|
|
1302
|
+
*
|
|
1303
|
+
* `strict` - command is used for drizzle-kit push commands and will always ask for your confirmation,
|
|
1304
|
+
* either to execute all statements needed to sync your schema with the database or not.
|
|
1305
|
+
*
|
|
1306
|
+
* See https://orm.drizzle.team/kit-docs/config-reference#strict
|
|
1143
1307
|
*/
|
|
1144
|
-
type
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1308
|
+
type Config = {
|
|
1309
|
+
dialect: Dialect;
|
|
1310
|
+
out?: string;
|
|
1311
|
+
breakpoints?: boolean;
|
|
1312
|
+
tablesFilter?: string | string[];
|
|
1313
|
+
extensionsFilters?: 'postgis'[];
|
|
1314
|
+
schemaFilter?: string | string[];
|
|
1315
|
+
schema?: string | string[];
|
|
1316
|
+
verbose?: boolean;
|
|
1317
|
+
strict?: boolean;
|
|
1318
|
+
casing?: 'camelCase' | 'snake_case';
|
|
1319
|
+
migrations?: {
|
|
1320
|
+
table?: string;
|
|
1321
|
+
schema?: string;
|
|
1322
|
+
prefix?: Prefix;
|
|
1323
|
+
};
|
|
1324
|
+
introspect?: {
|
|
1325
|
+
casing: 'camel' | 'preserve';
|
|
1326
|
+
};
|
|
1327
|
+
entities?: {
|
|
1328
|
+
roles?: boolean | {
|
|
1329
|
+
provider?: 'supabase' | 'neon' | string & {};
|
|
1330
|
+
exclude?: string[];
|
|
1331
|
+
include?: string[];
|
|
1332
|
+
};
|
|
1333
|
+
};
|
|
1334
|
+
} & ({
|
|
1335
|
+
dialect: Verify<Dialect, 'turso'>;
|
|
1336
|
+
dbCredentials: {
|
|
1337
|
+
url: string;
|
|
1338
|
+
authToken?: string;
|
|
1339
|
+
};
|
|
1340
|
+
} | {
|
|
1341
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
|
1342
|
+
dbCredentials: {
|
|
1343
|
+
url: string;
|
|
1344
|
+
};
|
|
1345
|
+
} | {
|
|
1346
|
+
dialect: Verify<Dialect, 'postgresql'>;
|
|
1347
|
+
dbCredentials: ({
|
|
1348
|
+
host: string;
|
|
1349
|
+
port?: number;
|
|
1350
|
+
user?: string;
|
|
1351
|
+
password?: string;
|
|
1352
|
+
database: string;
|
|
1353
|
+
ssl?: boolean | 'require' | 'allow' | 'prefer' | 'verify-full' | ConnectionOptions;
|
|
1354
|
+
} & {}) | {
|
|
1355
|
+
url: string;
|
|
1356
|
+
};
|
|
1357
|
+
} | {
|
|
1358
|
+
dialect: Verify<Dialect, 'postgresql'>;
|
|
1359
|
+
driver: Verify<Driver, 'aws-data-api'>;
|
|
1360
|
+
dbCredentials: {
|
|
1361
|
+
database: string;
|
|
1362
|
+
secretArn: string;
|
|
1363
|
+
resourceArn: string;
|
|
1364
|
+
};
|
|
1365
|
+
} | {
|
|
1366
|
+
dialect: Verify<Dialect, 'postgresql'>;
|
|
1367
|
+
driver: Verify<Driver, 'pglite'>;
|
|
1368
|
+
dbCredentials: {
|
|
1369
|
+
url: string;
|
|
1370
|
+
};
|
|
1371
|
+
} | {
|
|
1372
|
+
dialect: Verify<Dialect, 'mysql'>;
|
|
1373
|
+
dbCredentials: {
|
|
1374
|
+
host: string;
|
|
1375
|
+
port?: number;
|
|
1376
|
+
user?: string;
|
|
1377
|
+
password?: string;
|
|
1378
|
+
database: string;
|
|
1379
|
+
ssl?: string | SslOptions;
|
|
1380
|
+
} | {
|
|
1381
|
+
url: string;
|
|
1382
|
+
};
|
|
1383
|
+
} | {
|
|
1384
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
|
1385
|
+
driver: Verify<Driver, 'd1-http'>;
|
|
1386
|
+
dbCredentials: {
|
|
1387
|
+
accountId: string;
|
|
1388
|
+
databaseId: string;
|
|
1389
|
+
token: string;
|
|
1390
|
+
};
|
|
1391
|
+
} | {
|
|
1392
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
|
1393
|
+
driver: Verify<Driver, 'expo'>;
|
|
1394
|
+
} | {
|
|
1395
|
+
dialect: Verify<Dialect, 'sqlite'>;
|
|
1396
|
+
driver: Verify<Driver, 'durable-sqlite'>;
|
|
1397
|
+
} | {} | {
|
|
1398
|
+
dialect: Verify<Dialect, 'singlestore'>;
|
|
1399
|
+
dbCredentials: {
|
|
1400
|
+
host: string;
|
|
1401
|
+
port?: number;
|
|
1402
|
+
user?: string;
|
|
1403
|
+
password?: string;
|
|
1404
|
+
database: string;
|
|
1405
|
+
ssl?: string | SslOptions;
|
|
1406
|
+
} | {
|
|
1407
|
+
url: string;
|
|
1408
|
+
};
|
|
1409
|
+
} | {
|
|
1410
|
+
dialect: Verify<Dialect, 'gel'>;
|
|
1411
|
+
dbCredentials?: {
|
|
1412
|
+
tlsSecurity?: 'insecure' | 'no_host_verification' | 'strict' | 'default';
|
|
1413
|
+
} & ({
|
|
1414
|
+
url: string;
|
|
1415
|
+
} | ({
|
|
1416
|
+
host: string;
|
|
1417
|
+
port?: number;
|
|
1418
|
+
user?: string;
|
|
1419
|
+
password?: string;
|
|
1420
|
+
database: string;
|
|
1421
|
+
}));
|
|
1422
|
+
});
|
|
1423
|
+
|
|
1424
|
+
declare const schema$2: zod.ZodObject<{
|
|
1425
|
+
version: zod.ZodLiteral<"5">;
|
|
1426
|
+
dialect: zod.ZodLiteral<"mysql">;
|
|
1427
|
+
tables: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
1428
|
+
name: zod.ZodString;
|
|
1429
|
+
columns: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
1430
|
+
name: zod.ZodString;
|
|
1431
|
+
type: zod.ZodString;
|
|
1432
|
+
primaryKey: zod.ZodBoolean;
|
|
1433
|
+
notNull: zod.ZodBoolean;
|
|
1434
|
+
autoincrement: zod.ZodOptional<zod.ZodBoolean>;
|
|
1435
|
+
default: zod.ZodOptional<zod.ZodAny>;
|
|
1436
|
+
onUpdate: zod.ZodOptional<zod.ZodAny>;
|
|
1437
|
+
generated: zod.ZodOptional<zod.ZodObject<{
|
|
1438
|
+
type: zod.ZodEnum<["stored", "virtual"]>;
|
|
1439
|
+
as: zod.ZodString;
|
|
1440
|
+
}, "strip", zod.ZodTypeAny, {
|
|
1441
|
+
type: "stored" | "virtual";
|
|
1442
|
+
as: string;
|
|
1443
|
+
}, {
|
|
1444
|
+
type: "stored" | "virtual";
|
|
1445
|
+
as: string;
|
|
1446
|
+
}>>;
|
|
1447
|
+
}, "strict", zod.ZodTypeAny, {
|
|
1448
|
+
name: string;
|
|
1449
|
+
type: string;
|
|
1450
|
+
primaryKey: boolean;
|
|
1451
|
+
notNull: boolean;
|
|
1452
|
+
default?: any;
|
|
1453
|
+
onUpdate?: any;
|
|
1454
|
+
autoincrement?: boolean | undefined;
|
|
1455
|
+
generated?: {
|
|
1456
|
+
type: "stored" | "virtual";
|
|
1457
|
+
as: string;
|
|
1458
|
+
} | undefined;
|
|
1459
|
+
}, {
|
|
1460
|
+
name: string;
|
|
1461
|
+
type: string;
|
|
1462
|
+
primaryKey: boolean;
|
|
1463
|
+
notNull: boolean;
|
|
1464
|
+
default?: any;
|
|
1465
|
+
onUpdate?: any;
|
|
1466
|
+
autoincrement?: boolean | undefined;
|
|
1467
|
+
generated?: {
|
|
1468
|
+
type: "stored" | "virtual";
|
|
1469
|
+
as: string;
|
|
1470
|
+
} | undefined;
|
|
1471
|
+
}>>;
|
|
1472
|
+
indexes: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
1473
|
+
name: zod.ZodString;
|
|
1474
|
+
columns: zod.ZodArray<zod.ZodString, "many">;
|
|
1475
|
+
isUnique: zod.ZodBoolean;
|
|
1476
|
+
using: zod.ZodOptional<zod.ZodEnum<["btree", "hash"]>>;
|
|
1477
|
+
algorithm: zod.ZodOptional<zod.ZodEnum<["default", "inplace", "copy"]>>;
|
|
1478
|
+
lock: zod.ZodOptional<zod.ZodEnum<["default", "none", "shared", "exclusive"]>>;
|
|
1479
|
+
}, "strict", zod.ZodTypeAny, {
|
|
1480
|
+
name: string;
|
|
1481
|
+
columns: string[];
|
|
1482
|
+
isUnique: boolean;
|
|
1483
|
+
using?: "btree" | "hash" | undefined;
|
|
1484
|
+
algorithm?: "default" | "inplace" | "copy" | undefined;
|
|
1485
|
+
lock?: "none" | "default" | "shared" | "exclusive" | undefined;
|
|
1486
|
+
}, {
|
|
1487
|
+
name: string;
|
|
1488
|
+
columns: string[];
|
|
1489
|
+
isUnique: boolean;
|
|
1490
|
+
using?: "btree" | "hash" | undefined;
|
|
1491
|
+
algorithm?: "default" | "inplace" | "copy" | undefined;
|
|
1492
|
+
lock?: "none" | "default" | "shared" | "exclusive" | undefined;
|
|
1493
|
+
}>>;
|
|
1494
|
+
foreignKeys: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
1495
|
+
name: zod.ZodString;
|
|
1496
|
+
tableFrom: zod.ZodString;
|
|
1497
|
+
columnsFrom: zod.ZodArray<zod.ZodString, "many">;
|
|
1498
|
+
tableTo: zod.ZodString;
|
|
1499
|
+
columnsTo: zod.ZodArray<zod.ZodString, "many">;
|
|
1500
|
+
onUpdate: zod.ZodOptional<zod.ZodString>;
|
|
1501
|
+
onDelete: zod.ZodOptional<zod.ZodString>;
|
|
1502
|
+
}, "strict", zod.ZodTypeAny, {
|
|
1503
|
+
name: string;
|
|
1504
|
+
tableFrom: string;
|
|
1505
|
+
columnsFrom: string[];
|
|
1506
|
+
tableTo: string;
|
|
1507
|
+
columnsTo: string[];
|
|
1508
|
+
onUpdate?: string | undefined;
|
|
1509
|
+
onDelete?: string | undefined;
|
|
1510
|
+
}, {
|
|
1511
|
+
name: string;
|
|
1512
|
+
tableFrom: string;
|
|
1513
|
+
columnsFrom: string[];
|
|
1514
|
+
tableTo: string;
|
|
1515
|
+
columnsTo: string[];
|
|
1516
|
+
onUpdate?: string | undefined;
|
|
1517
|
+
onDelete?: string | undefined;
|
|
1518
|
+
}>>;
|
|
1519
|
+
compositePrimaryKeys: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
1520
|
+
name: zod.ZodString;
|
|
1521
|
+
columns: zod.ZodArray<zod.ZodString, "many">;
|
|
1522
|
+
}, "strict", zod.ZodTypeAny, {
|
|
1523
|
+
name: string;
|
|
1524
|
+
columns: string[];
|
|
1525
|
+
}, {
|
|
1526
|
+
name: string;
|
|
1527
|
+
columns: string[];
|
|
1528
|
+
}>>;
|
|
1529
|
+
uniqueConstraints: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
1530
|
+
name: zod.ZodString;
|
|
1531
|
+
columns: zod.ZodArray<zod.ZodString, "many">;
|
|
1532
|
+
}, "strict", zod.ZodTypeAny, {
|
|
1533
|
+
name: string;
|
|
1534
|
+
columns: string[];
|
|
1535
|
+
}, {
|
|
1536
|
+
name: string;
|
|
1537
|
+
columns: string[];
|
|
1538
|
+
}>>>;
|
|
1539
|
+
checkConstraint: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
1540
|
+
name: zod.ZodString;
|
|
1541
|
+
value: zod.ZodString;
|
|
1542
|
+
}, "strict", zod.ZodTypeAny, {
|
|
1543
|
+
name: string;
|
|
1544
|
+
value: string;
|
|
1545
|
+
}, {
|
|
1546
|
+
name: string;
|
|
1547
|
+
value: string;
|
|
1548
|
+
}>>>;
|
|
1549
|
+
}, "strict", zod.ZodTypeAny, {
|
|
1550
|
+
name: string;
|
|
1551
|
+
columns: Record<string, {
|
|
1552
|
+
name: string;
|
|
1553
|
+
type: string;
|
|
1554
|
+
primaryKey: boolean;
|
|
1555
|
+
notNull: boolean;
|
|
1556
|
+
default?: any;
|
|
1557
|
+
onUpdate?: any;
|
|
1558
|
+
autoincrement?: boolean | undefined;
|
|
1559
|
+
generated?: {
|
|
1560
|
+
type: "stored" | "virtual";
|
|
1561
|
+
as: string;
|
|
1562
|
+
} | undefined;
|
|
1563
|
+
}>;
|
|
1564
|
+
indexes: Record<string, {
|
|
1565
|
+
name: string;
|
|
1566
|
+
columns: string[];
|
|
1567
|
+
isUnique: boolean;
|
|
1568
|
+
using?: "btree" | "hash" | undefined;
|
|
1569
|
+
algorithm?: "default" | "inplace" | "copy" | undefined;
|
|
1570
|
+
lock?: "none" | "default" | "shared" | "exclusive" | undefined;
|
|
1571
|
+
}>;
|
|
1572
|
+
foreignKeys: Record<string, {
|
|
1573
|
+
name: string;
|
|
1574
|
+
tableFrom: string;
|
|
1575
|
+
columnsFrom: string[];
|
|
1576
|
+
tableTo: string;
|
|
1577
|
+
columnsTo: string[];
|
|
1578
|
+
onUpdate?: string | undefined;
|
|
1579
|
+
onDelete?: string | undefined;
|
|
1580
|
+
}>;
|
|
1581
|
+
compositePrimaryKeys: Record<string, {
|
|
1582
|
+
name: string;
|
|
1583
|
+
columns: string[];
|
|
1584
|
+
}>;
|
|
1585
|
+
uniqueConstraints: Record<string, {
|
|
1586
|
+
name: string;
|
|
1587
|
+
columns: string[];
|
|
1588
|
+
}>;
|
|
1589
|
+
checkConstraint: Record<string, {
|
|
1590
|
+
name: string;
|
|
1591
|
+
value: string;
|
|
1592
|
+
}>;
|
|
1593
|
+
}, {
|
|
1594
|
+
name: string;
|
|
1595
|
+
columns: Record<string, {
|
|
1596
|
+
name: string;
|
|
1597
|
+
type: string;
|
|
1598
|
+
primaryKey: boolean;
|
|
1599
|
+
notNull: boolean;
|
|
1600
|
+
default?: any;
|
|
1601
|
+
onUpdate?: any;
|
|
1602
|
+
autoincrement?: boolean | undefined;
|
|
1603
|
+
generated?: {
|
|
1604
|
+
type: "stored" | "virtual";
|
|
1605
|
+
as: string;
|
|
1606
|
+
} | undefined;
|
|
1607
|
+
}>;
|
|
1608
|
+
indexes: Record<string, {
|
|
1609
|
+
name: string;
|
|
1610
|
+
columns: string[];
|
|
1611
|
+
isUnique: boolean;
|
|
1612
|
+
using?: "btree" | "hash" | undefined;
|
|
1613
|
+
algorithm?: "default" | "inplace" | "copy" | undefined;
|
|
1614
|
+
lock?: "none" | "default" | "shared" | "exclusive" | undefined;
|
|
1615
|
+
}>;
|
|
1616
|
+
foreignKeys: Record<string, {
|
|
1617
|
+
name: string;
|
|
1618
|
+
tableFrom: string;
|
|
1619
|
+
columnsFrom: string[];
|
|
1620
|
+
tableTo: string;
|
|
1621
|
+
columnsTo: string[];
|
|
1622
|
+
onUpdate?: string | undefined;
|
|
1623
|
+
onDelete?: string | undefined;
|
|
1624
|
+
}>;
|
|
1625
|
+
compositePrimaryKeys: Record<string, {
|
|
1626
|
+
name: string;
|
|
1627
|
+
columns: string[];
|
|
1628
|
+
}>;
|
|
1629
|
+
uniqueConstraints?: Record<string, {
|
|
1630
|
+
name: string;
|
|
1631
|
+
columns: string[];
|
|
1632
|
+
}> | undefined;
|
|
1633
|
+
checkConstraint?: Record<string, {
|
|
1634
|
+
name: string;
|
|
1635
|
+
value: string;
|
|
1636
|
+
}> | undefined;
|
|
1637
|
+
}>>;
|
|
1638
|
+
views: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
1639
|
+
name: zod.ZodString;
|
|
1640
|
+
columns: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
1641
|
+
name: zod.ZodString;
|
|
1642
|
+
type: zod.ZodString;
|
|
1643
|
+
primaryKey: zod.ZodBoolean;
|
|
1644
|
+
notNull: zod.ZodBoolean;
|
|
1645
|
+
autoincrement: zod.ZodOptional<zod.ZodBoolean>;
|
|
1646
|
+
default: zod.ZodOptional<zod.ZodAny>;
|
|
1647
|
+
onUpdate: zod.ZodOptional<zod.ZodAny>;
|
|
1648
|
+
generated: zod.ZodOptional<zod.ZodObject<{
|
|
1649
|
+
type: zod.ZodEnum<["stored", "virtual"]>;
|
|
1650
|
+
as: zod.ZodString;
|
|
1651
|
+
}, "strip", zod.ZodTypeAny, {
|
|
1652
|
+
type: "stored" | "virtual";
|
|
1653
|
+
as: string;
|
|
1654
|
+
}, {
|
|
1655
|
+
type: "stored" | "virtual";
|
|
1656
|
+
as: string;
|
|
1657
|
+
}>>;
|
|
1658
|
+
}, "strict", zod.ZodTypeAny, {
|
|
1659
|
+
name: string;
|
|
1660
|
+
type: string;
|
|
1661
|
+
primaryKey: boolean;
|
|
1662
|
+
notNull: boolean;
|
|
1663
|
+
default?: any;
|
|
1664
|
+
onUpdate?: any;
|
|
1665
|
+
autoincrement?: boolean | undefined;
|
|
1666
|
+
generated?: {
|
|
1667
|
+
type: "stored" | "virtual";
|
|
1668
|
+
as: string;
|
|
1669
|
+
} | undefined;
|
|
1670
|
+
}, {
|
|
1671
|
+
name: string;
|
|
1672
|
+
type: string;
|
|
1673
|
+
primaryKey: boolean;
|
|
1674
|
+
notNull: boolean;
|
|
1675
|
+
default?: any;
|
|
1676
|
+
onUpdate?: any;
|
|
1677
|
+
autoincrement?: boolean | undefined;
|
|
1678
|
+
generated?: {
|
|
1679
|
+
type: "stored" | "virtual";
|
|
1680
|
+
as: string;
|
|
1681
|
+
} | undefined;
|
|
1682
|
+
}>>;
|
|
1683
|
+
definition: zod.ZodOptional<zod.ZodString>;
|
|
1684
|
+
isExisting: zod.ZodBoolean;
|
|
1685
|
+
} & {
|
|
1686
|
+
algorithm: zod.ZodEnum<["undefined", "merge", "temptable"]>;
|
|
1687
|
+
sqlSecurity: zod.ZodEnum<["definer", "invoker"]>;
|
|
1688
|
+
withCheckOption: zod.ZodOptional<zod.ZodEnum<["local", "cascaded"]>>;
|
|
1689
|
+
}, "strict", zod.ZodTypeAny, {
|
|
1690
|
+
name: string;
|
|
1691
|
+
columns: Record<string, {
|
|
1692
|
+
name: string;
|
|
1693
|
+
type: string;
|
|
1694
|
+
primaryKey: boolean;
|
|
1695
|
+
notNull: boolean;
|
|
1696
|
+
default?: any;
|
|
1697
|
+
onUpdate?: any;
|
|
1698
|
+
autoincrement?: boolean | undefined;
|
|
1699
|
+
generated?: {
|
|
1700
|
+
type: "stored" | "virtual";
|
|
1701
|
+
as: string;
|
|
1702
|
+
} | undefined;
|
|
1703
|
+
}>;
|
|
1704
|
+
algorithm: "undefined" | "merge" | "temptable";
|
|
1705
|
+
sqlSecurity: "definer" | "invoker";
|
|
1706
|
+
isExisting: boolean;
|
|
1707
|
+
withCheckOption?: "local" | "cascaded" | undefined;
|
|
1708
|
+
definition?: string | undefined;
|
|
1709
|
+
}, {
|
|
1710
|
+
name: string;
|
|
1711
|
+
columns: Record<string, {
|
|
1712
|
+
name: string;
|
|
1713
|
+
type: string;
|
|
1714
|
+
primaryKey: boolean;
|
|
1715
|
+
notNull: boolean;
|
|
1716
|
+
default?: any;
|
|
1717
|
+
onUpdate?: any;
|
|
1718
|
+
autoincrement?: boolean | undefined;
|
|
1719
|
+
generated?: {
|
|
1720
|
+
type: "stored" | "virtual";
|
|
1721
|
+
as: string;
|
|
1722
|
+
} | undefined;
|
|
1723
|
+
}>;
|
|
1724
|
+
algorithm: "undefined" | "merge" | "temptable";
|
|
1725
|
+
sqlSecurity: "definer" | "invoker";
|
|
1726
|
+
isExisting: boolean;
|
|
1727
|
+
withCheckOption?: "local" | "cascaded" | undefined;
|
|
1728
|
+
definition?: string | undefined;
|
|
1729
|
+
}>>>;
|
|
1730
|
+
_meta: zod.ZodObject<{
|
|
1731
|
+
tables: zod.ZodRecord<zod.ZodString, zod.ZodString>;
|
|
1732
|
+
columns: zod.ZodRecord<zod.ZodString, zod.ZodString>;
|
|
1733
|
+
}, "strip", zod.ZodTypeAny, {
|
|
1734
|
+
columns: Record<string, string>;
|
|
1735
|
+
tables: Record<string, string>;
|
|
1736
|
+
}, {
|
|
1737
|
+
columns: Record<string, string>;
|
|
1738
|
+
tables: Record<string, string>;
|
|
1739
|
+
}>;
|
|
1740
|
+
internal: zod.ZodOptional<zod.ZodObject<{
|
|
1741
|
+
tables: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodOptional<zod.ZodObject<{
|
|
1742
|
+
columns: zod.ZodRecord<zod.ZodString, zod.ZodOptional<zod.ZodObject<{
|
|
1743
|
+
isDefaultAnExpression: zod.ZodOptional<zod.ZodBoolean>;
|
|
1744
|
+
}, "strip", zod.ZodTypeAny, {
|
|
1745
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
1746
|
+
}, {
|
|
1747
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
1748
|
+
}>>>;
|
|
1749
|
+
}, "strip", zod.ZodTypeAny, {
|
|
1750
|
+
columns: Record<string, {
|
|
1751
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
1752
|
+
} | undefined>;
|
|
1753
|
+
}, {
|
|
1754
|
+
columns: Record<string, {
|
|
1755
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
1756
|
+
} | undefined>;
|
|
1757
|
+
}>>>>;
|
|
1758
|
+
indexes: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodOptional<zod.ZodObject<{
|
|
1759
|
+
columns: zod.ZodRecord<zod.ZodString, zod.ZodOptional<zod.ZodObject<{
|
|
1760
|
+
isExpression: zod.ZodOptional<zod.ZodBoolean>;
|
|
1761
|
+
}, "strip", zod.ZodTypeAny, {
|
|
1762
|
+
isExpression?: boolean | undefined;
|
|
1763
|
+
}, {
|
|
1764
|
+
isExpression?: boolean | undefined;
|
|
1765
|
+
}>>>;
|
|
1766
|
+
}, "strip", zod.ZodTypeAny, {
|
|
1767
|
+
columns: Record<string, {
|
|
1768
|
+
isExpression?: boolean | undefined;
|
|
1769
|
+
} | undefined>;
|
|
1770
|
+
}, {
|
|
1771
|
+
columns: Record<string, {
|
|
1772
|
+
isExpression?: boolean | undefined;
|
|
1773
|
+
} | undefined>;
|
|
1774
|
+
}>>>>;
|
|
1775
|
+
}, "strip", zod.ZodTypeAny, {
|
|
1776
|
+
indexes?: Record<string, {
|
|
1777
|
+
columns: Record<string, {
|
|
1778
|
+
isExpression?: boolean | undefined;
|
|
1779
|
+
} | undefined>;
|
|
1780
|
+
} | undefined> | undefined;
|
|
1781
|
+
tables?: Record<string, {
|
|
1782
|
+
columns: Record<string, {
|
|
1783
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
1784
|
+
} | undefined>;
|
|
1785
|
+
} | undefined> | undefined;
|
|
1786
|
+
}, {
|
|
1787
|
+
indexes?: Record<string, {
|
|
1788
|
+
columns: Record<string, {
|
|
1789
|
+
isExpression?: boolean | undefined;
|
|
1790
|
+
} | undefined>;
|
|
1791
|
+
} | undefined> | undefined;
|
|
1792
|
+
tables?: Record<string, {
|
|
1793
|
+
columns: Record<string, {
|
|
1794
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
1795
|
+
} | undefined>;
|
|
1796
|
+
} | undefined> | undefined;
|
|
1797
|
+
}>>;
|
|
1798
|
+
} & {
|
|
1799
|
+
id: zod.ZodString;
|
|
1800
|
+
prevId: zod.ZodString;
|
|
1801
|
+
}, "strip", zod.ZodTypeAny, {
|
|
1802
|
+
tables: Record<string, {
|
|
1803
|
+
name: string;
|
|
1804
|
+
columns: Record<string, {
|
|
1805
|
+
name: string;
|
|
1806
|
+
type: string;
|
|
1807
|
+
primaryKey: boolean;
|
|
1808
|
+
notNull: boolean;
|
|
1809
|
+
default?: any;
|
|
1810
|
+
onUpdate?: any;
|
|
1811
|
+
autoincrement?: boolean | undefined;
|
|
1812
|
+
generated?: {
|
|
1813
|
+
type: "stored" | "virtual";
|
|
1814
|
+
as: string;
|
|
1815
|
+
} | undefined;
|
|
1816
|
+
}>;
|
|
1817
|
+
indexes: Record<string, {
|
|
1818
|
+
name: string;
|
|
1819
|
+
columns: string[];
|
|
1820
|
+
isUnique: boolean;
|
|
1821
|
+
using?: "btree" | "hash" | undefined;
|
|
1822
|
+
algorithm?: "default" | "inplace" | "copy" | undefined;
|
|
1823
|
+
lock?: "none" | "default" | "shared" | "exclusive" | undefined;
|
|
1824
|
+
}>;
|
|
1825
|
+
foreignKeys: Record<string, {
|
|
1826
|
+
name: string;
|
|
1827
|
+
tableFrom: string;
|
|
1828
|
+
columnsFrom: string[];
|
|
1829
|
+
tableTo: string;
|
|
1830
|
+
columnsTo: string[];
|
|
1831
|
+
onUpdate?: string | undefined;
|
|
1832
|
+
onDelete?: string | undefined;
|
|
1833
|
+
}>;
|
|
1834
|
+
compositePrimaryKeys: Record<string, {
|
|
1835
|
+
name: string;
|
|
1836
|
+
columns: string[];
|
|
1837
|
+
}>;
|
|
1838
|
+
uniqueConstraints: Record<string, {
|
|
1839
|
+
name: string;
|
|
1840
|
+
columns: string[];
|
|
1841
|
+
}>;
|
|
1842
|
+
checkConstraint: Record<string, {
|
|
1843
|
+
name: string;
|
|
1844
|
+
value: string;
|
|
1845
|
+
}>;
|
|
1846
|
+
}>;
|
|
1847
|
+
id: string;
|
|
1848
|
+
prevId: string;
|
|
1849
|
+
version: "5";
|
|
1850
|
+
dialect: "mysql";
|
|
1851
|
+
_meta: {
|
|
1852
|
+
columns: Record<string, string>;
|
|
1853
|
+
tables: Record<string, string>;
|
|
1854
|
+
};
|
|
1855
|
+
views: Record<string, {
|
|
1856
|
+
name: string;
|
|
1857
|
+
columns: Record<string, {
|
|
1858
|
+
name: string;
|
|
1859
|
+
type: string;
|
|
1860
|
+
primaryKey: boolean;
|
|
1861
|
+
notNull: boolean;
|
|
1862
|
+
default?: any;
|
|
1863
|
+
onUpdate?: any;
|
|
1864
|
+
autoincrement?: boolean | undefined;
|
|
1865
|
+
generated?: {
|
|
1866
|
+
type: "stored" | "virtual";
|
|
1867
|
+
as: string;
|
|
1868
|
+
} | undefined;
|
|
1869
|
+
}>;
|
|
1870
|
+
algorithm: "undefined" | "merge" | "temptable";
|
|
1871
|
+
sqlSecurity: "definer" | "invoker";
|
|
1872
|
+
isExisting: boolean;
|
|
1873
|
+
withCheckOption?: "local" | "cascaded" | undefined;
|
|
1874
|
+
definition?: string | undefined;
|
|
1875
|
+
}>;
|
|
1876
|
+
internal?: {
|
|
1877
|
+
indexes?: Record<string, {
|
|
1878
|
+
columns: Record<string, {
|
|
1879
|
+
isExpression?: boolean | undefined;
|
|
1880
|
+
} | undefined>;
|
|
1881
|
+
} | undefined> | undefined;
|
|
1882
|
+
tables?: Record<string, {
|
|
1883
|
+
columns: Record<string, {
|
|
1884
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
1885
|
+
} | undefined>;
|
|
1886
|
+
} | undefined> | undefined;
|
|
1887
|
+
} | undefined;
|
|
1888
|
+
}, {
|
|
1889
|
+
tables: Record<string, {
|
|
1890
|
+
name: string;
|
|
1891
|
+
columns: Record<string, {
|
|
1892
|
+
name: string;
|
|
1893
|
+
type: string;
|
|
1894
|
+
primaryKey: boolean;
|
|
1895
|
+
notNull: boolean;
|
|
1896
|
+
default?: any;
|
|
1897
|
+
onUpdate?: any;
|
|
1898
|
+
autoincrement?: boolean | undefined;
|
|
1899
|
+
generated?: {
|
|
1900
|
+
type: "stored" | "virtual";
|
|
1901
|
+
as: string;
|
|
1902
|
+
} | undefined;
|
|
1903
|
+
}>;
|
|
1904
|
+
indexes: Record<string, {
|
|
1905
|
+
name: string;
|
|
1906
|
+
columns: string[];
|
|
1907
|
+
isUnique: boolean;
|
|
1908
|
+
using?: "btree" | "hash" | undefined;
|
|
1909
|
+
algorithm?: "default" | "inplace" | "copy" | undefined;
|
|
1910
|
+
lock?: "none" | "default" | "shared" | "exclusive" | undefined;
|
|
1911
|
+
}>;
|
|
1912
|
+
foreignKeys: Record<string, {
|
|
1913
|
+
name: string;
|
|
1914
|
+
tableFrom: string;
|
|
1915
|
+
columnsFrom: string[];
|
|
1916
|
+
tableTo: string;
|
|
1917
|
+
columnsTo: string[];
|
|
1918
|
+
onUpdate?: string | undefined;
|
|
1919
|
+
onDelete?: string | undefined;
|
|
1920
|
+
}>;
|
|
1921
|
+
compositePrimaryKeys: Record<string, {
|
|
1922
|
+
name: string;
|
|
1923
|
+
columns: string[];
|
|
1924
|
+
}>;
|
|
1925
|
+
uniqueConstraints?: Record<string, {
|
|
1926
|
+
name: string;
|
|
1927
|
+
columns: string[];
|
|
1928
|
+
}> | undefined;
|
|
1929
|
+
checkConstraint?: Record<string, {
|
|
1930
|
+
name: string;
|
|
1931
|
+
value: string;
|
|
1932
|
+
}> | undefined;
|
|
1933
|
+
}>;
|
|
1934
|
+
id: string;
|
|
1935
|
+
prevId: string;
|
|
1936
|
+
version: "5";
|
|
1937
|
+
dialect: "mysql";
|
|
1938
|
+
_meta: {
|
|
1939
|
+
columns: Record<string, string>;
|
|
1940
|
+
tables: Record<string, string>;
|
|
1941
|
+
};
|
|
1942
|
+
internal?: {
|
|
1943
|
+
indexes?: Record<string, {
|
|
1944
|
+
columns: Record<string, {
|
|
1945
|
+
isExpression?: boolean | undefined;
|
|
1946
|
+
} | undefined>;
|
|
1947
|
+
} | undefined> | undefined;
|
|
1948
|
+
tables?: Record<string, {
|
|
1949
|
+
columns: Record<string, {
|
|
1950
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
1951
|
+
} | undefined>;
|
|
1952
|
+
} | undefined> | undefined;
|
|
1953
|
+
} | undefined;
|
|
1954
|
+
views?: Record<string, {
|
|
1955
|
+
name: string;
|
|
1956
|
+
columns: Record<string, {
|
|
1957
|
+
name: string;
|
|
1958
|
+
type: string;
|
|
1959
|
+
primaryKey: boolean;
|
|
1960
|
+
notNull: boolean;
|
|
1961
|
+
default?: any;
|
|
1962
|
+
onUpdate?: any;
|
|
1963
|
+
autoincrement?: boolean | undefined;
|
|
1964
|
+
generated?: {
|
|
1965
|
+
type: "stored" | "virtual";
|
|
1966
|
+
as: string;
|
|
1967
|
+
} | undefined;
|
|
1968
|
+
}>;
|
|
1969
|
+
algorithm: "undefined" | "merge" | "temptable";
|
|
1970
|
+
sqlSecurity: "definer" | "invoker";
|
|
1971
|
+
isExisting: boolean;
|
|
1972
|
+
withCheckOption?: "local" | "cascaded" | undefined;
|
|
1973
|
+
definition?: string | undefined;
|
|
1974
|
+
}> | undefined;
|
|
1975
|
+
}>;
|
|
1976
|
+
type MySqlSchema = TypeOf<typeof schema$2>;
|
|
1977
|
+
|
|
1978
|
+
declare const pgSchema: zod.ZodObject<{
|
|
1979
|
+
version: zod.ZodLiteral<"7">;
|
|
1980
|
+
dialect: zod.ZodLiteral<"postgresql">;
|
|
1981
|
+
tables: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
1982
|
+
name: zod.ZodString;
|
|
1983
|
+
schema: zod.ZodString;
|
|
1984
|
+
columns: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
1985
|
+
name: zod.ZodString;
|
|
1986
|
+
type: zod.ZodString;
|
|
1987
|
+
typeSchema: zod.ZodOptional<zod.ZodString>;
|
|
1988
|
+
primaryKey: zod.ZodBoolean;
|
|
1989
|
+
notNull: zod.ZodBoolean;
|
|
1990
|
+
default: zod.ZodOptional<zod.ZodAny>;
|
|
1991
|
+
isUnique: zod.ZodOptional<zod.ZodAny>;
|
|
1992
|
+
uniqueName: zod.ZodOptional<zod.ZodString>;
|
|
1993
|
+
nullsNotDistinct: zod.ZodOptional<zod.ZodBoolean>;
|
|
1994
|
+
generated: zod.ZodOptional<zod.ZodObject<{
|
|
1995
|
+
type: zod.ZodLiteral<"stored">;
|
|
1996
|
+
as: zod.ZodString;
|
|
1997
|
+
}, "strip", zod.ZodTypeAny, {
|
|
1998
|
+
type: "stored";
|
|
1999
|
+
as: string;
|
|
2000
|
+
}, {
|
|
2001
|
+
type: "stored";
|
|
2002
|
+
as: string;
|
|
2003
|
+
}>>;
|
|
2004
|
+
identity: zod.ZodOptional<zod.ZodObject<{
|
|
2005
|
+
name: zod.ZodString;
|
|
2006
|
+
increment: zod.ZodOptional<zod.ZodString>;
|
|
2007
|
+
minValue: zod.ZodOptional<zod.ZodString>;
|
|
2008
|
+
maxValue: zod.ZodOptional<zod.ZodString>;
|
|
2009
|
+
startWith: zod.ZodOptional<zod.ZodString>;
|
|
2010
|
+
cache: zod.ZodOptional<zod.ZodString>;
|
|
2011
|
+
cycle: zod.ZodOptional<zod.ZodBoolean>;
|
|
2012
|
+
schema: zod.ZodString;
|
|
2013
|
+
} & {
|
|
2014
|
+
type: zod.ZodEnum<["always", "byDefault"]>;
|
|
2015
|
+
}, "strip", zod.ZodTypeAny, {
|
|
2016
|
+
name: string;
|
|
2017
|
+
type: "always" | "byDefault";
|
|
2018
|
+
schema: string;
|
|
2019
|
+
increment?: string | undefined;
|
|
2020
|
+
minValue?: string | undefined;
|
|
2021
|
+
maxValue?: string | undefined;
|
|
2022
|
+
startWith?: string | undefined;
|
|
2023
|
+
cache?: string | undefined;
|
|
2024
|
+
cycle?: boolean | undefined;
|
|
2025
|
+
}, {
|
|
2026
|
+
name: string;
|
|
2027
|
+
type: "always" | "byDefault";
|
|
2028
|
+
schema: string;
|
|
2029
|
+
increment?: string | undefined;
|
|
2030
|
+
minValue?: string | undefined;
|
|
2031
|
+
maxValue?: string | undefined;
|
|
2032
|
+
startWith?: string | undefined;
|
|
2033
|
+
cache?: string | undefined;
|
|
2034
|
+
cycle?: boolean | undefined;
|
|
2035
|
+
}>>;
|
|
2036
|
+
}, "strict", zod.ZodTypeAny, {
|
|
2037
|
+
name: string;
|
|
2038
|
+
type: string;
|
|
2039
|
+
primaryKey: boolean;
|
|
2040
|
+
notNull: boolean;
|
|
2041
|
+
default?: any;
|
|
2042
|
+
isUnique?: any;
|
|
2043
|
+
generated?: {
|
|
2044
|
+
type: "stored";
|
|
2045
|
+
as: string;
|
|
2046
|
+
} | undefined;
|
|
2047
|
+
typeSchema?: string | undefined;
|
|
2048
|
+
uniqueName?: string | undefined;
|
|
2049
|
+
nullsNotDistinct?: boolean | undefined;
|
|
2050
|
+
identity?: {
|
|
2051
|
+
name: string;
|
|
2052
|
+
type: "always" | "byDefault";
|
|
2053
|
+
schema: string;
|
|
2054
|
+
increment?: string | undefined;
|
|
2055
|
+
minValue?: string | undefined;
|
|
2056
|
+
maxValue?: string | undefined;
|
|
2057
|
+
startWith?: string | undefined;
|
|
2058
|
+
cache?: string | undefined;
|
|
2059
|
+
cycle?: boolean | undefined;
|
|
2060
|
+
} | undefined;
|
|
2061
|
+
}, {
|
|
2062
|
+
name: string;
|
|
2063
|
+
type: string;
|
|
2064
|
+
primaryKey: boolean;
|
|
2065
|
+
notNull: boolean;
|
|
2066
|
+
default?: any;
|
|
2067
|
+
isUnique?: any;
|
|
2068
|
+
generated?: {
|
|
2069
|
+
type: "stored";
|
|
2070
|
+
as: string;
|
|
2071
|
+
} | undefined;
|
|
2072
|
+
typeSchema?: string | undefined;
|
|
2073
|
+
uniqueName?: string | undefined;
|
|
2074
|
+
nullsNotDistinct?: boolean | undefined;
|
|
2075
|
+
identity?: {
|
|
2076
|
+
name: string;
|
|
2077
|
+
type: "always" | "byDefault";
|
|
2078
|
+
schema: string;
|
|
2079
|
+
increment?: string | undefined;
|
|
2080
|
+
minValue?: string | undefined;
|
|
2081
|
+
maxValue?: string | undefined;
|
|
2082
|
+
startWith?: string | undefined;
|
|
2083
|
+
cache?: string | undefined;
|
|
2084
|
+
cycle?: boolean | undefined;
|
|
2085
|
+
} | undefined;
|
|
2086
|
+
}>>;
|
|
2087
|
+
indexes: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
2088
|
+
name: zod.ZodString;
|
|
2089
|
+
columns: zod.ZodArray<zod.ZodObject<{
|
|
2090
|
+
expression: zod.ZodString;
|
|
2091
|
+
isExpression: zod.ZodBoolean;
|
|
2092
|
+
asc: zod.ZodBoolean;
|
|
2093
|
+
nulls: zod.ZodOptional<zod.ZodString>;
|
|
2094
|
+
opclass: zod.ZodOptional<zod.ZodString>;
|
|
2095
|
+
}, "strip", zod.ZodTypeAny, {
|
|
2096
|
+
isExpression: boolean;
|
|
2097
|
+
expression: string;
|
|
2098
|
+
asc: boolean;
|
|
2099
|
+
nulls?: string | undefined;
|
|
2100
|
+
opclass?: string | undefined;
|
|
2101
|
+
}, {
|
|
2102
|
+
isExpression: boolean;
|
|
2103
|
+
expression: string;
|
|
2104
|
+
asc: boolean;
|
|
2105
|
+
nulls?: string | undefined;
|
|
2106
|
+
opclass?: string | undefined;
|
|
2107
|
+
}>, "many">;
|
|
2108
|
+
isUnique: zod.ZodBoolean;
|
|
2109
|
+
with: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
|
|
2110
|
+
method: zod.ZodDefault<zod.ZodString>;
|
|
2111
|
+
where: zod.ZodOptional<zod.ZodString>;
|
|
2112
|
+
concurrently: zod.ZodDefault<zod.ZodBoolean>;
|
|
2113
|
+
}, "strict", zod.ZodTypeAny, {
|
|
2114
|
+
name: string;
|
|
2115
|
+
columns: {
|
|
2116
|
+
isExpression: boolean;
|
|
2117
|
+
expression: string;
|
|
2118
|
+
asc: boolean;
|
|
2119
|
+
nulls?: string | undefined;
|
|
2120
|
+
opclass?: string | undefined;
|
|
2121
|
+
}[];
|
|
2122
|
+
isUnique: boolean;
|
|
2123
|
+
method: string;
|
|
2124
|
+
concurrently: boolean;
|
|
2125
|
+
with?: Record<string, any> | undefined;
|
|
2126
|
+
where?: string | undefined;
|
|
2127
|
+
}, {
|
|
2128
|
+
name: string;
|
|
2129
|
+
columns: {
|
|
2130
|
+
isExpression: boolean;
|
|
2131
|
+
expression: string;
|
|
2132
|
+
asc: boolean;
|
|
2133
|
+
nulls?: string | undefined;
|
|
2134
|
+
opclass?: string | undefined;
|
|
2135
|
+
}[];
|
|
2136
|
+
isUnique: boolean;
|
|
2137
|
+
with?: Record<string, any> | undefined;
|
|
2138
|
+
method?: string | undefined;
|
|
2139
|
+
where?: string | undefined;
|
|
2140
|
+
concurrently?: boolean | undefined;
|
|
2141
|
+
}>>;
|
|
2142
|
+
foreignKeys: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
2143
|
+
name: zod.ZodString;
|
|
2144
|
+
tableFrom: zod.ZodString;
|
|
2145
|
+
columnsFrom: zod.ZodArray<zod.ZodString, "many">;
|
|
2146
|
+
tableTo: zod.ZodString;
|
|
2147
|
+
schemaTo: zod.ZodOptional<zod.ZodString>;
|
|
2148
|
+
columnsTo: zod.ZodArray<zod.ZodString, "many">;
|
|
2149
|
+
onUpdate: zod.ZodOptional<zod.ZodString>;
|
|
2150
|
+
onDelete: zod.ZodOptional<zod.ZodString>;
|
|
2151
|
+
}, "strict", zod.ZodTypeAny, {
|
|
2152
|
+
name: string;
|
|
2153
|
+
tableFrom: string;
|
|
2154
|
+
columnsFrom: string[];
|
|
2155
|
+
tableTo: string;
|
|
2156
|
+
columnsTo: string[];
|
|
2157
|
+
onUpdate?: string | undefined;
|
|
2158
|
+
onDelete?: string | undefined;
|
|
2159
|
+
schemaTo?: string | undefined;
|
|
2160
|
+
}, {
|
|
2161
|
+
name: string;
|
|
2162
|
+
tableFrom: string;
|
|
2163
|
+
columnsFrom: string[];
|
|
2164
|
+
tableTo: string;
|
|
2165
|
+
columnsTo: string[];
|
|
2166
|
+
onUpdate?: string | undefined;
|
|
2167
|
+
onDelete?: string | undefined;
|
|
2168
|
+
schemaTo?: string | undefined;
|
|
2169
|
+
}>>;
|
|
2170
|
+
compositePrimaryKeys: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
2171
|
+
name: zod.ZodString;
|
|
2172
|
+
columns: zod.ZodArray<zod.ZodString, "many">;
|
|
2173
|
+
}, "strict", zod.ZodTypeAny, {
|
|
2174
|
+
name: string;
|
|
2175
|
+
columns: string[];
|
|
2176
|
+
}, {
|
|
2177
|
+
name: string;
|
|
2178
|
+
columns: string[];
|
|
2179
|
+
}>>;
|
|
2180
|
+
uniqueConstraints: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
2181
|
+
name: zod.ZodString;
|
|
2182
|
+
columns: zod.ZodArray<zod.ZodString, "many">;
|
|
2183
|
+
nullsNotDistinct: zod.ZodBoolean;
|
|
2184
|
+
}, "strict", zod.ZodTypeAny, {
|
|
2185
|
+
name: string;
|
|
2186
|
+
columns: string[];
|
|
2187
|
+
nullsNotDistinct: boolean;
|
|
2188
|
+
}, {
|
|
2189
|
+
name: string;
|
|
2190
|
+
columns: string[];
|
|
2191
|
+
nullsNotDistinct: boolean;
|
|
2192
|
+
}>>>;
|
|
2193
|
+
policies: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
2194
|
+
name: zod.ZodString;
|
|
2195
|
+
as: zod.ZodOptional<zod.ZodEnum<["PERMISSIVE", "RESTRICTIVE"]>>;
|
|
2196
|
+
for: zod.ZodOptional<zod.ZodEnum<["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]>>;
|
|
2197
|
+
to: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
2198
|
+
using: zod.ZodOptional<zod.ZodString>;
|
|
2199
|
+
withCheck: zod.ZodOptional<zod.ZodString>;
|
|
2200
|
+
on: zod.ZodOptional<zod.ZodString>;
|
|
2201
|
+
schema: zod.ZodOptional<zod.ZodString>;
|
|
2202
|
+
}, "strict", zod.ZodTypeAny, {
|
|
2203
|
+
name: string;
|
|
2204
|
+
using?: string | undefined;
|
|
2205
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
2206
|
+
schema?: string | undefined;
|
|
2207
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
2208
|
+
to?: string[] | undefined;
|
|
2209
|
+
withCheck?: string | undefined;
|
|
2210
|
+
on?: string | undefined;
|
|
2211
|
+
}, {
|
|
2212
|
+
name: string;
|
|
2213
|
+
using?: string | undefined;
|
|
2214
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
2215
|
+
schema?: string | undefined;
|
|
2216
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
2217
|
+
to?: string[] | undefined;
|
|
2218
|
+
withCheck?: string | undefined;
|
|
2219
|
+
on?: string | undefined;
|
|
2220
|
+
}>>>;
|
|
2221
|
+
checkConstraints: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
2222
|
+
name: zod.ZodString;
|
|
2223
|
+
value: zod.ZodString;
|
|
2224
|
+
}, "strict", zod.ZodTypeAny, {
|
|
2225
|
+
name: string;
|
|
2226
|
+
value: string;
|
|
2227
|
+
}, {
|
|
2228
|
+
name: string;
|
|
2229
|
+
value: string;
|
|
2230
|
+
}>>>;
|
|
2231
|
+
isRLSEnabled: zod.ZodDefault<zod.ZodBoolean>;
|
|
2232
|
+
}, "strict", zod.ZodTypeAny, {
|
|
2233
|
+
name: string;
|
|
2234
|
+
columns: Record<string, {
|
|
2235
|
+
name: string;
|
|
2236
|
+
type: string;
|
|
2237
|
+
primaryKey: boolean;
|
|
2238
|
+
notNull: boolean;
|
|
2239
|
+
default?: any;
|
|
2240
|
+
isUnique?: any;
|
|
2241
|
+
generated?: {
|
|
2242
|
+
type: "stored";
|
|
2243
|
+
as: string;
|
|
2244
|
+
} | undefined;
|
|
2245
|
+
typeSchema?: string | undefined;
|
|
2246
|
+
uniqueName?: string | undefined;
|
|
2247
|
+
nullsNotDistinct?: boolean | undefined;
|
|
2248
|
+
identity?: {
|
|
2249
|
+
name: string;
|
|
2250
|
+
type: "always" | "byDefault";
|
|
2251
|
+
schema: string;
|
|
2252
|
+
increment?: string | undefined;
|
|
2253
|
+
minValue?: string | undefined;
|
|
2254
|
+
maxValue?: string | undefined;
|
|
2255
|
+
startWith?: string | undefined;
|
|
2256
|
+
cache?: string | undefined;
|
|
2257
|
+
cycle?: boolean | undefined;
|
|
2258
|
+
} | undefined;
|
|
2259
|
+
}>;
|
|
2260
|
+
indexes: Record<string, {
|
|
2261
|
+
name: string;
|
|
2262
|
+
columns: {
|
|
2263
|
+
isExpression: boolean;
|
|
2264
|
+
expression: string;
|
|
2265
|
+
asc: boolean;
|
|
2266
|
+
nulls?: string | undefined;
|
|
2267
|
+
opclass?: string | undefined;
|
|
2268
|
+
}[];
|
|
2269
|
+
isUnique: boolean;
|
|
2270
|
+
method: string;
|
|
2271
|
+
concurrently: boolean;
|
|
2272
|
+
with?: Record<string, any> | undefined;
|
|
2273
|
+
where?: string | undefined;
|
|
2274
|
+
}>;
|
|
2275
|
+
foreignKeys: Record<string, {
|
|
2276
|
+
name: string;
|
|
2277
|
+
tableFrom: string;
|
|
2278
|
+
columnsFrom: string[];
|
|
2279
|
+
tableTo: string;
|
|
2280
|
+
columnsTo: string[];
|
|
2281
|
+
onUpdate?: string | undefined;
|
|
2282
|
+
onDelete?: string | undefined;
|
|
2283
|
+
schemaTo?: string | undefined;
|
|
2284
|
+
}>;
|
|
2285
|
+
schema: string;
|
|
2286
|
+
compositePrimaryKeys: Record<string, {
|
|
2287
|
+
name: string;
|
|
2288
|
+
columns: string[];
|
|
2289
|
+
}>;
|
|
2290
|
+
uniqueConstraints: Record<string, {
|
|
2291
|
+
name: string;
|
|
2292
|
+
columns: string[];
|
|
2293
|
+
nullsNotDistinct: boolean;
|
|
2294
|
+
}>;
|
|
2295
|
+
checkConstraints: Record<string, {
|
|
2296
|
+
name: string;
|
|
2297
|
+
value: string;
|
|
2298
|
+
}>;
|
|
2299
|
+
policies: Record<string, {
|
|
2300
|
+
name: string;
|
|
2301
|
+
using?: string | undefined;
|
|
2302
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
2303
|
+
schema?: string | undefined;
|
|
2304
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
2305
|
+
to?: string[] | undefined;
|
|
2306
|
+
withCheck?: string | undefined;
|
|
2307
|
+
on?: string | undefined;
|
|
2308
|
+
}>;
|
|
2309
|
+
isRLSEnabled: boolean;
|
|
2310
|
+
}, {
|
|
2311
|
+
name: string;
|
|
2312
|
+
columns: Record<string, {
|
|
2313
|
+
name: string;
|
|
2314
|
+
type: string;
|
|
2315
|
+
primaryKey: boolean;
|
|
2316
|
+
notNull: boolean;
|
|
2317
|
+
default?: any;
|
|
2318
|
+
isUnique?: any;
|
|
2319
|
+
generated?: {
|
|
2320
|
+
type: "stored";
|
|
2321
|
+
as: string;
|
|
2322
|
+
} | undefined;
|
|
2323
|
+
typeSchema?: string | undefined;
|
|
2324
|
+
uniqueName?: string | undefined;
|
|
2325
|
+
nullsNotDistinct?: boolean | undefined;
|
|
2326
|
+
identity?: {
|
|
2327
|
+
name: string;
|
|
2328
|
+
type: "always" | "byDefault";
|
|
2329
|
+
schema: string;
|
|
2330
|
+
increment?: string | undefined;
|
|
2331
|
+
minValue?: string | undefined;
|
|
2332
|
+
maxValue?: string | undefined;
|
|
2333
|
+
startWith?: string | undefined;
|
|
2334
|
+
cache?: string | undefined;
|
|
2335
|
+
cycle?: boolean | undefined;
|
|
2336
|
+
} | undefined;
|
|
2337
|
+
}>;
|
|
2338
|
+
indexes: Record<string, {
|
|
2339
|
+
name: string;
|
|
2340
|
+
columns: {
|
|
2341
|
+
isExpression: boolean;
|
|
2342
|
+
expression: string;
|
|
2343
|
+
asc: boolean;
|
|
2344
|
+
nulls?: string | undefined;
|
|
2345
|
+
opclass?: string | undefined;
|
|
2346
|
+
}[];
|
|
2347
|
+
isUnique: boolean;
|
|
2348
|
+
with?: Record<string, any> | undefined;
|
|
2349
|
+
method?: string | undefined;
|
|
2350
|
+
where?: string | undefined;
|
|
2351
|
+
concurrently?: boolean | undefined;
|
|
2352
|
+
}>;
|
|
2353
|
+
foreignKeys: Record<string, {
|
|
2354
|
+
name: string;
|
|
2355
|
+
tableFrom: string;
|
|
2356
|
+
columnsFrom: string[];
|
|
2357
|
+
tableTo: string;
|
|
2358
|
+
columnsTo: string[];
|
|
2359
|
+
onUpdate?: string | undefined;
|
|
2360
|
+
onDelete?: string | undefined;
|
|
2361
|
+
schemaTo?: string | undefined;
|
|
2362
|
+
}>;
|
|
2363
|
+
schema: string;
|
|
2364
|
+
compositePrimaryKeys: Record<string, {
|
|
2365
|
+
name: string;
|
|
2366
|
+
columns: string[];
|
|
2367
|
+
}>;
|
|
2368
|
+
uniqueConstraints?: Record<string, {
|
|
2369
|
+
name: string;
|
|
2370
|
+
columns: string[];
|
|
2371
|
+
nullsNotDistinct: boolean;
|
|
2372
|
+
}> | undefined;
|
|
2373
|
+
checkConstraints?: Record<string, {
|
|
2374
|
+
name: string;
|
|
2375
|
+
value: string;
|
|
2376
|
+
}> | undefined;
|
|
2377
|
+
policies?: Record<string, {
|
|
2378
|
+
name: string;
|
|
2379
|
+
using?: string | undefined;
|
|
2380
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
2381
|
+
schema?: string | undefined;
|
|
2382
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
2383
|
+
to?: string[] | undefined;
|
|
2384
|
+
withCheck?: string | undefined;
|
|
2385
|
+
on?: string | undefined;
|
|
2386
|
+
}> | undefined;
|
|
2387
|
+
isRLSEnabled?: boolean | undefined;
|
|
2388
|
+
}>>;
|
|
2389
|
+
enums: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
2390
|
+
name: zod.ZodString;
|
|
2391
|
+
schema: zod.ZodString;
|
|
2392
|
+
values: zod.ZodArray<zod.ZodString, "many">;
|
|
2393
|
+
}, "strict", zod.ZodTypeAny, {
|
|
2394
|
+
name: string;
|
|
2395
|
+
values: string[];
|
|
2396
|
+
schema: string;
|
|
2397
|
+
}, {
|
|
2398
|
+
name: string;
|
|
2399
|
+
values: string[];
|
|
2400
|
+
schema: string;
|
|
2401
|
+
}>>;
|
|
2402
|
+
schemas: zod.ZodRecord<zod.ZodString, zod.ZodString>;
|
|
2403
|
+
views: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
2404
|
+
name: zod.ZodString;
|
|
2405
|
+
schema: zod.ZodString;
|
|
2406
|
+
columns: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
2407
|
+
name: zod.ZodString;
|
|
2408
|
+
type: zod.ZodString;
|
|
2409
|
+
typeSchema: zod.ZodOptional<zod.ZodString>;
|
|
2410
|
+
primaryKey: zod.ZodBoolean;
|
|
2411
|
+
notNull: zod.ZodBoolean;
|
|
2412
|
+
default: zod.ZodOptional<zod.ZodAny>;
|
|
2413
|
+
isUnique: zod.ZodOptional<zod.ZodAny>;
|
|
2414
|
+
uniqueName: zod.ZodOptional<zod.ZodString>;
|
|
2415
|
+
nullsNotDistinct: zod.ZodOptional<zod.ZodBoolean>;
|
|
2416
|
+
generated: zod.ZodOptional<zod.ZodObject<{
|
|
2417
|
+
type: zod.ZodLiteral<"stored">;
|
|
2418
|
+
as: zod.ZodString;
|
|
2419
|
+
}, "strip", zod.ZodTypeAny, {
|
|
2420
|
+
type: "stored";
|
|
2421
|
+
as: string;
|
|
2422
|
+
}, {
|
|
2423
|
+
type: "stored";
|
|
2424
|
+
as: string;
|
|
2425
|
+
}>>;
|
|
2426
|
+
identity: zod.ZodOptional<zod.ZodObject<{
|
|
2427
|
+
name: zod.ZodString;
|
|
2428
|
+
increment: zod.ZodOptional<zod.ZodString>;
|
|
2429
|
+
minValue: zod.ZodOptional<zod.ZodString>;
|
|
2430
|
+
maxValue: zod.ZodOptional<zod.ZodString>;
|
|
2431
|
+
startWith: zod.ZodOptional<zod.ZodString>;
|
|
2432
|
+
cache: zod.ZodOptional<zod.ZodString>;
|
|
2433
|
+
cycle: zod.ZodOptional<zod.ZodBoolean>;
|
|
2434
|
+
schema: zod.ZodString;
|
|
2435
|
+
} & {
|
|
2436
|
+
type: zod.ZodEnum<["always", "byDefault"]>;
|
|
2437
|
+
}, "strip", zod.ZodTypeAny, {
|
|
2438
|
+
name: string;
|
|
2439
|
+
type: "always" | "byDefault";
|
|
2440
|
+
schema: string;
|
|
2441
|
+
increment?: string | undefined;
|
|
2442
|
+
minValue?: string | undefined;
|
|
2443
|
+
maxValue?: string | undefined;
|
|
2444
|
+
startWith?: string | undefined;
|
|
2445
|
+
cache?: string | undefined;
|
|
2446
|
+
cycle?: boolean | undefined;
|
|
2447
|
+
}, {
|
|
2448
|
+
name: string;
|
|
2449
|
+
type: "always" | "byDefault";
|
|
2450
|
+
schema: string;
|
|
2451
|
+
increment?: string | undefined;
|
|
2452
|
+
minValue?: string | undefined;
|
|
2453
|
+
maxValue?: string | undefined;
|
|
2454
|
+
startWith?: string | undefined;
|
|
2455
|
+
cache?: string | undefined;
|
|
2456
|
+
cycle?: boolean | undefined;
|
|
2457
|
+
}>>;
|
|
2458
|
+
}, "strict", zod.ZodTypeAny, {
|
|
2459
|
+
name: string;
|
|
2460
|
+
type: string;
|
|
2461
|
+
primaryKey: boolean;
|
|
2462
|
+
notNull: boolean;
|
|
2463
|
+
default?: any;
|
|
2464
|
+
isUnique?: any;
|
|
2465
|
+
generated?: {
|
|
2466
|
+
type: "stored";
|
|
2467
|
+
as: string;
|
|
2468
|
+
} | undefined;
|
|
2469
|
+
typeSchema?: string | undefined;
|
|
2470
|
+
uniqueName?: string | undefined;
|
|
2471
|
+
nullsNotDistinct?: boolean | undefined;
|
|
2472
|
+
identity?: {
|
|
2473
|
+
name: string;
|
|
2474
|
+
type: "always" | "byDefault";
|
|
2475
|
+
schema: string;
|
|
2476
|
+
increment?: string | undefined;
|
|
2477
|
+
minValue?: string | undefined;
|
|
2478
|
+
maxValue?: string | undefined;
|
|
2479
|
+
startWith?: string | undefined;
|
|
2480
|
+
cache?: string | undefined;
|
|
2481
|
+
cycle?: boolean | undefined;
|
|
2482
|
+
} | undefined;
|
|
2483
|
+
}, {
|
|
2484
|
+
name: string;
|
|
2485
|
+
type: string;
|
|
2486
|
+
primaryKey: boolean;
|
|
2487
|
+
notNull: boolean;
|
|
2488
|
+
default?: any;
|
|
2489
|
+
isUnique?: any;
|
|
2490
|
+
generated?: {
|
|
2491
|
+
type: "stored";
|
|
2492
|
+
as: string;
|
|
2493
|
+
} | undefined;
|
|
2494
|
+
typeSchema?: string | undefined;
|
|
2495
|
+
uniqueName?: string | undefined;
|
|
2496
|
+
nullsNotDistinct?: boolean | undefined;
|
|
2497
|
+
identity?: {
|
|
2498
|
+
name: string;
|
|
2499
|
+
type: "always" | "byDefault";
|
|
2500
|
+
schema: string;
|
|
2501
|
+
increment?: string | undefined;
|
|
2502
|
+
minValue?: string | undefined;
|
|
2503
|
+
maxValue?: string | undefined;
|
|
2504
|
+
startWith?: string | undefined;
|
|
2505
|
+
cache?: string | undefined;
|
|
2506
|
+
cycle?: boolean | undefined;
|
|
2507
|
+
} | undefined;
|
|
2508
|
+
}>>;
|
|
2509
|
+
definition: zod.ZodOptional<zod.ZodString>;
|
|
2510
|
+
materialized: zod.ZodBoolean;
|
|
2511
|
+
with: zod.ZodOptional<zod.ZodObject<{
|
|
2512
|
+
checkOption: zod.ZodOptional<zod.ZodEnum<["local", "cascaded"]>>;
|
|
2513
|
+
securityBarrier: zod.ZodOptional<zod.ZodBoolean>;
|
|
2514
|
+
securityInvoker: zod.ZodOptional<zod.ZodBoolean>;
|
|
2515
|
+
} & {
|
|
2516
|
+
fillfactor: zod.ZodOptional<zod.ZodNumber>;
|
|
2517
|
+
toastTupleTarget: zod.ZodOptional<zod.ZodNumber>;
|
|
2518
|
+
parallelWorkers: zod.ZodOptional<zod.ZodNumber>;
|
|
2519
|
+
autovacuumEnabled: zod.ZodOptional<zod.ZodBoolean>;
|
|
2520
|
+
vacuumIndexCleanup: zod.ZodOptional<zod.ZodEnum<["auto", "off", "on"]>>;
|
|
2521
|
+
vacuumTruncate: zod.ZodOptional<zod.ZodBoolean>;
|
|
2522
|
+
autovacuumVacuumThreshold: zod.ZodOptional<zod.ZodNumber>;
|
|
2523
|
+
autovacuumVacuumScaleFactor: zod.ZodOptional<zod.ZodNumber>;
|
|
2524
|
+
autovacuumVacuumCostDelay: zod.ZodOptional<zod.ZodNumber>;
|
|
2525
|
+
autovacuumVacuumCostLimit: zod.ZodOptional<zod.ZodNumber>;
|
|
2526
|
+
autovacuumFreezeMinAge: zod.ZodOptional<zod.ZodNumber>;
|
|
2527
|
+
autovacuumFreezeMaxAge: zod.ZodOptional<zod.ZodNumber>;
|
|
2528
|
+
autovacuumFreezeTableAge: zod.ZodOptional<zod.ZodNumber>;
|
|
2529
|
+
autovacuumMultixactFreezeMinAge: zod.ZodOptional<zod.ZodNumber>;
|
|
2530
|
+
autovacuumMultixactFreezeMaxAge: zod.ZodOptional<zod.ZodNumber>;
|
|
2531
|
+
autovacuumMultixactFreezeTableAge: zod.ZodOptional<zod.ZodNumber>;
|
|
2532
|
+
logAutovacuumMinDuration: zod.ZodOptional<zod.ZodNumber>;
|
|
2533
|
+
userCatalogTable: zod.ZodOptional<zod.ZodBoolean>;
|
|
2534
|
+
}, "strict", zod.ZodTypeAny, {
|
|
2535
|
+
checkOption?: "local" | "cascaded" | undefined;
|
|
2536
|
+
securityBarrier?: boolean | undefined;
|
|
2537
|
+
securityInvoker?: boolean | undefined;
|
|
2538
|
+
fillfactor?: number | undefined;
|
|
2539
|
+
toastTupleTarget?: number | undefined;
|
|
2540
|
+
parallelWorkers?: number | undefined;
|
|
2541
|
+
autovacuumEnabled?: boolean | undefined;
|
|
2542
|
+
vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
|
|
2543
|
+
vacuumTruncate?: boolean | undefined;
|
|
2544
|
+
autovacuumVacuumThreshold?: number | undefined;
|
|
2545
|
+
autovacuumVacuumScaleFactor?: number | undefined;
|
|
2546
|
+
autovacuumVacuumCostDelay?: number | undefined;
|
|
2547
|
+
autovacuumVacuumCostLimit?: number | undefined;
|
|
2548
|
+
autovacuumFreezeMinAge?: number | undefined;
|
|
2549
|
+
autovacuumFreezeMaxAge?: number | undefined;
|
|
2550
|
+
autovacuumFreezeTableAge?: number | undefined;
|
|
2551
|
+
autovacuumMultixactFreezeMinAge?: number | undefined;
|
|
2552
|
+
autovacuumMultixactFreezeMaxAge?: number | undefined;
|
|
2553
|
+
autovacuumMultixactFreezeTableAge?: number | undefined;
|
|
2554
|
+
logAutovacuumMinDuration?: number | undefined;
|
|
2555
|
+
userCatalogTable?: boolean | undefined;
|
|
2556
|
+
}, {
|
|
2557
|
+
checkOption?: "local" | "cascaded" | undefined;
|
|
2558
|
+
securityBarrier?: boolean | undefined;
|
|
2559
|
+
securityInvoker?: boolean | undefined;
|
|
2560
|
+
fillfactor?: number | undefined;
|
|
2561
|
+
toastTupleTarget?: number | undefined;
|
|
2562
|
+
parallelWorkers?: number | undefined;
|
|
2563
|
+
autovacuumEnabled?: boolean | undefined;
|
|
2564
|
+
vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
|
|
2565
|
+
vacuumTruncate?: boolean | undefined;
|
|
2566
|
+
autovacuumVacuumThreshold?: number | undefined;
|
|
2567
|
+
autovacuumVacuumScaleFactor?: number | undefined;
|
|
2568
|
+
autovacuumVacuumCostDelay?: number | undefined;
|
|
2569
|
+
autovacuumVacuumCostLimit?: number | undefined;
|
|
2570
|
+
autovacuumFreezeMinAge?: number | undefined;
|
|
2571
|
+
autovacuumFreezeMaxAge?: number | undefined;
|
|
2572
|
+
autovacuumFreezeTableAge?: number | undefined;
|
|
2573
|
+
autovacuumMultixactFreezeMinAge?: number | undefined;
|
|
2574
|
+
autovacuumMultixactFreezeMaxAge?: number | undefined;
|
|
2575
|
+
autovacuumMultixactFreezeTableAge?: number | undefined;
|
|
2576
|
+
logAutovacuumMinDuration?: number | undefined;
|
|
2577
|
+
userCatalogTable?: boolean | undefined;
|
|
2578
|
+
}>>;
|
|
2579
|
+
isExisting: zod.ZodBoolean;
|
|
2580
|
+
withNoData: zod.ZodOptional<zod.ZodBoolean>;
|
|
2581
|
+
using: zod.ZodOptional<zod.ZodString>;
|
|
2582
|
+
tablespace: zod.ZodOptional<zod.ZodString>;
|
|
2583
|
+
}, "strict", zod.ZodTypeAny, {
|
|
2584
|
+
name: string;
|
|
2585
|
+
columns: Record<string, {
|
|
2586
|
+
name: string;
|
|
2587
|
+
type: string;
|
|
2588
|
+
primaryKey: boolean;
|
|
2589
|
+
notNull: boolean;
|
|
2590
|
+
default?: any;
|
|
2591
|
+
isUnique?: any;
|
|
2592
|
+
generated?: {
|
|
2593
|
+
type: "stored";
|
|
2594
|
+
as: string;
|
|
2595
|
+
} | undefined;
|
|
2596
|
+
typeSchema?: string | undefined;
|
|
2597
|
+
uniqueName?: string | undefined;
|
|
2598
|
+
nullsNotDistinct?: boolean | undefined;
|
|
2599
|
+
identity?: {
|
|
2600
|
+
name: string;
|
|
2601
|
+
type: "always" | "byDefault";
|
|
2602
|
+
schema: string;
|
|
2603
|
+
increment?: string | undefined;
|
|
2604
|
+
minValue?: string | undefined;
|
|
2605
|
+
maxValue?: string | undefined;
|
|
2606
|
+
startWith?: string | undefined;
|
|
2607
|
+
cache?: string | undefined;
|
|
2608
|
+
cycle?: boolean | undefined;
|
|
2609
|
+
} | undefined;
|
|
2610
|
+
}>;
|
|
2611
|
+
schema: string;
|
|
2612
|
+
isExisting: boolean;
|
|
2613
|
+
materialized: boolean;
|
|
2614
|
+
using?: string | undefined;
|
|
2615
|
+
definition?: string | undefined;
|
|
2616
|
+
with?: {
|
|
2617
|
+
checkOption?: "local" | "cascaded" | undefined;
|
|
2618
|
+
securityBarrier?: boolean | undefined;
|
|
2619
|
+
securityInvoker?: boolean | undefined;
|
|
2620
|
+
fillfactor?: number | undefined;
|
|
2621
|
+
toastTupleTarget?: number | undefined;
|
|
2622
|
+
parallelWorkers?: number | undefined;
|
|
2623
|
+
autovacuumEnabled?: boolean | undefined;
|
|
2624
|
+
vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
|
|
2625
|
+
vacuumTruncate?: boolean | undefined;
|
|
2626
|
+
autovacuumVacuumThreshold?: number | undefined;
|
|
2627
|
+
autovacuumVacuumScaleFactor?: number | undefined;
|
|
2628
|
+
autovacuumVacuumCostDelay?: number | undefined;
|
|
2629
|
+
autovacuumVacuumCostLimit?: number | undefined;
|
|
2630
|
+
autovacuumFreezeMinAge?: number | undefined;
|
|
2631
|
+
autovacuumFreezeMaxAge?: number | undefined;
|
|
2632
|
+
autovacuumFreezeTableAge?: number | undefined;
|
|
2633
|
+
autovacuumMultixactFreezeMinAge?: number | undefined;
|
|
2634
|
+
autovacuumMultixactFreezeMaxAge?: number | undefined;
|
|
2635
|
+
autovacuumMultixactFreezeTableAge?: number | undefined;
|
|
2636
|
+
logAutovacuumMinDuration?: number | undefined;
|
|
2637
|
+
userCatalogTable?: boolean | undefined;
|
|
2638
|
+
} | undefined;
|
|
2639
|
+
withNoData?: boolean | undefined;
|
|
2640
|
+
tablespace?: string | undefined;
|
|
2641
|
+
}, {
|
|
2642
|
+
name: string;
|
|
2643
|
+
columns: Record<string, {
|
|
2644
|
+
name: string;
|
|
2645
|
+
type: string;
|
|
2646
|
+
primaryKey: boolean;
|
|
2647
|
+
notNull: boolean;
|
|
2648
|
+
default?: any;
|
|
2649
|
+
isUnique?: any;
|
|
2650
|
+
generated?: {
|
|
2651
|
+
type: "stored";
|
|
2652
|
+
as: string;
|
|
2653
|
+
} | undefined;
|
|
2654
|
+
typeSchema?: string | undefined;
|
|
2655
|
+
uniqueName?: string | undefined;
|
|
2656
|
+
nullsNotDistinct?: boolean | undefined;
|
|
2657
|
+
identity?: {
|
|
2658
|
+
name: string;
|
|
2659
|
+
type: "always" | "byDefault";
|
|
2660
|
+
schema: string;
|
|
2661
|
+
increment?: string | undefined;
|
|
2662
|
+
minValue?: string | undefined;
|
|
2663
|
+
maxValue?: string | undefined;
|
|
2664
|
+
startWith?: string | undefined;
|
|
2665
|
+
cache?: string | undefined;
|
|
2666
|
+
cycle?: boolean | undefined;
|
|
2667
|
+
} | undefined;
|
|
2668
|
+
}>;
|
|
2669
|
+
schema: string;
|
|
2670
|
+
isExisting: boolean;
|
|
2671
|
+
materialized: boolean;
|
|
2672
|
+
using?: string | undefined;
|
|
2673
|
+
definition?: string | undefined;
|
|
2674
|
+
with?: {
|
|
2675
|
+
checkOption?: "local" | "cascaded" | undefined;
|
|
2676
|
+
securityBarrier?: boolean | undefined;
|
|
2677
|
+
securityInvoker?: boolean | undefined;
|
|
2678
|
+
fillfactor?: number | undefined;
|
|
2679
|
+
toastTupleTarget?: number | undefined;
|
|
2680
|
+
parallelWorkers?: number | undefined;
|
|
2681
|
+
autovacuumEnabled?: boolean | undefined;
|
|
2682
|
+
vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
|
|
2683
|
+
vacuumTruncate?: boolean | undefined;
|
|
2684
|
+
autovacuumVacuumThreshold?: number | undefined;
|
|
2685
|
+
autovacuumVacuumScaleFactor?: number | undefined;
|
|
2686
|
+
autovacuumVacuumCostDelay?: number | undefined;
|
|
2687
|
+
autovacuumVacuumCostLimit?: number | undefined;
|
|
2688
|
+
autovacuumFreezeMinAge?: number | undefined;
|
|
2689
|
+
autovacuumFreezeMaxAge?: number | undefined;
|
|
2690
|
+
autovacuumFreezeTableAge?: number | undefined;
|
|
2691
|
+
autovacuumMultixactFreezeMinAge?: number | undefined;
|
|
2692
|
+
autovacuumMultixactFreezeMaxAge?: number | undefined;
|
|
2693
|
+
autovacuumMultixactFreezeTableAge?: number | undefined;
|
|
2694
|
+
logAutovacuumMinDuration?: number | undefined;
|
|
2695
|
+
userCatalogTable?: boolean | undefined;
|
|
2696
|
+
} | undefined;
|
|
2697
|
+
withNoData?: boolean | undefined;
|
|
2698
|
+
tablespace?: string | undefined;
|
|
2699
|
+
}>>>;
|
|
2700
|
+
sequences: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
2701
|
+
name: zod.ZodString;
|
|
2702
|
+
increment: zod.ZodOptional<zod.ZodString>;
|
|
2703
|
+
minValue: zod.ZodOptional<zod.ZodString>;
|
|
2704
|
+
maxValue: zod.ZodOptional<zod.ZodString>;
|
|
2705
|
+
startWith: zod.ZodOptional<zod.ZodString>;
|
|
2706
|
+
cache: zod.ZodOptional<zod.ZodString>;
|
|
2707
|
+
cycle: zod.ZodOptional<zod.ZodBoolean>;
|
|
2708
|
+
schema: zod.ZodString;
|
|
2709
|
+
}, "strict", zod.ZodTypeAny, {
|
|
2710
|
+
name: string;
|
|
2711
|
+
schema: string;
|
|
2712
|
+
increment?: string | undefined;
|
|
2713
|
+
minValue?: string | undefined;
|
|
2714
|
+
maxValue?: string | undefined;
|
|
2715
|
+
startWith?: string | undefined;
|
|
2716
|
+
cache?: string | undefined;
|
|
2717
|
+
cycle?: boolean | undefined;
|
|
2718
|
+
}, {
|
|
2719
|
+
name: string;
|
|
2720
|
+
schema: string;
|
|
2721
|
+
increment?: string | undefined;
|
|
2722
|
+
minValue?: string | undefined;
|
|
2723
|
+
maxValue?: string | undefined;
|
|
2724
|
+
startWith?: string | undefined;
|
|
2725
|
+
cache?: string | undefined;
|
|
2726
|
+
cycle?: boolean | undefined;
|
|
2727
|
+
}>>>;
|
|
2728
|
+
roles: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
2729
|
+
name: zod.ZodString;
|
|
2730
|
+
createDb: zod.ZodOptional<zod.ZodBoolean>;
|
|
2731
|
+
createRole: zod.ZodOptional<zod.ZodBoolean>;
|
|
2732
|
+
inherit: zod.ZodOptional<zod.ZodBoolean>;
|
|
2733
|
+
}, "strict", zod.ZodTypeAny, {
|
|
2734
|
+
name: string;
|
|
2735
|
+
createDb?: boolean | undefined;
|
|
2736
|
+
createRole?: boolean | undefined;
|
|
2737
|
+
inherit?: boolean | undefined;
|
|
2738
|
+
}, {
|
|
2739
|
+
name: string;
|
|
2740
|
+
createDb?: boolean | undefined;
|
|
2741
|
+
createRole?: boolean | undefined;
|
|
2742
|
+
inherit?: boolean | undefined;
|
|
2743
|
+
}>>>;
|
|
2744
|
+
policies: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
2745
|
+
name: zod.ZodString;
|
|
2746
|
+
as: zod.ZodOptional<zod.ZodEnum<["PERMISSIVE", "RESTRICTIVE"]>>;
|
|
2747
|
+
for: zod.ZodOptional<zod.ZodEnum<["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]>>;
|
|
2748
|
+
to: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
2749
|
+
using: zod.ZodOptional<zod.ZodString>;
|
|
2750
|
+
withCheck: zod.ZodOptional<zod.ZodString>;
|
|
2751
|
+
on: zod.ZodOptional<zod.ZodString>;
|
|
2752
|
+
schema: zod.ZodOptional<zod.ZodString>;
|
|
2753
|
+
}, "strict", zod.ZodTypeAny, {
|
|
2754
|
+
name: string;
|
|
2755
|
+
using?: string | undefined;
|
|
2756
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
2757
|
+
schema?: string | undefined;
|
|
2758
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
2759
|
+
to?: string[] | undefined;
|
|
2760
|
+
withCheck?: string | undefined;
|
|
2761
|
+
on?: string | undefined;
|
|
2762
|
+
}, {
|
|
2763
|
+
name: string;
|
|
2764
|
+
using?: string | undefined;
|
|
2765
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
2766
|
+
schema?: string | undefined;
|
|
2767
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
2768
|
+
to?: string[] | undefined;
|
|
2769
|
+
withCheck?: string | undefined;
|
|
2770
|
+
on?: string | undefined;
|
|
2771
|
+
}>>>;
|
|
2772
|
+
_meta: zod.ZodObject<{
|
|
2773
|
+
schemas: zod.ZodRecord<zod.ZodString, zod.ZodString>;
|
|
2774
|
+
tables: zod.ZodRecord<zod.ZodString, zod.ZodString>;
|
|
2775
|
+
columns: zod.ZodRecord<zod.ZodString, zod.ZodString>;
|
|
2776
|
+
}, "strip", zod.ZodTypeAny, {
|
|
2777
|
+
columns: Record<string, string>;
|
|
2778
|
+
tables: Record<string, string>;
|
|
2779
|
+
schemas: Record<string, string>;
|
|
2780
|
+
}, {
|
|
2781
|
+
columns: Record<string, string>;
|
|
2782
|
+
tables: Record<string, string>;
|
|
2783
|
+
schemas: Record<string, string>;
|
|
2784
|
+
}>;
|
|
2785
|
+
internal: zod.ZodOptional<zod.ZodObject<{
|
|
2786
|
+
tables: zod.ZodRecord<zod.ZodString, zod.ZodOptional<zod.ZodObject<{
|
|
2787
|
+
columns: zod.ZodRecord<zod.ZodString, zod.ZodOptional<zod.ZodObject<{
|
|
2788
|
+
isArray: zod.ZodOptional<zod.ZodBoolean>;
|
|
2789
|
+
dimensions: zod.ZodOptional<zod.ZodNumber>;
|
|
2790
|
+
rawType: zod.ZodOptional<zod.ZodString>;
|
|
2791
|
+
isDefaultAnExpression: zod.ZodOptional<zod.ZodBoolean>;
|
|
2792
|
+
}, "strip", zod.ZodTypeAny, {
|
|
2793
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
2794
|
+
isArray?: boolean | undefined;
|
|
2795
|
+
dimensions?: number | undefined;
|
|
2796
|
+
rawType?: string | undefined;
|
|
2797
|
+
}, {
|
|
2798
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
2799
|
+
isArray?: boolean | undefined;
|
|
2800
|
+
dimensions?: number | undefined;
|
|
2801
|
+
rawType?: string | undefined;
|
|
2802
|
+
}>>>;
|
|
2803
|
+
}, "strip", zod.ZodTypeAny, {
|
|
2804
|
+
columns: Record<string, {
|
|
2805
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
2806
|
+
isArray?: boolean | undefined;
|
|
2807
|
+
dimensions?: number | undefined;
|
|
2808
|
+
rawType?: string | undefined;
|
|
2809
|
+
} | undefined>;
|
|
2810
|
+
}, {
|
|
2811
|
+
columns: Record<string, {
|
|
2812
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
2813
|
+
isArray?: boolean | undefined;
|
|
2814
|
+
dimensions?: number | undefined;
|
|
2815
|
+
rawType?: string | undefined;
|
|
2816
|
+
} | undefined>;
|
|
2817
|
+
}>>>;
|
|
2818
|
+
}, "strip", zod.ZodTypeAny, {
|
|
2819
|
+
tables: Record<string, {
|
|
2820
|
+
columns: Record<string, {
|
|
2821
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
2822
|
+
isArray?: boolean | undefined;
|
|
2823
|
+
dimensions?: number | undefined;
|
|
2824
|
+
rawType?: string | undefined;
|
|
2825
|
+
} | undefined>;
|
|
2826
|
+
} | undefined>;
|
|
2827
|
+
}, {
|
|
2828
|
+
tables: Record<string, {
|
|
2829
|
+
columns: Record<string, {
|
|
2830
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
2831
|
+
isArray?: boolean | undefined;
|
|
2832
|
+
dimensions?: number | undefined;
|
|
2833
|
+
rawType?: string | undefined;
|
|
2834
|
+
} | undefined>;
|
|
2835
|
+
} | undefined>;
|
|
2836
|
+
}>>;
|
|
2837
|
+
} & {
|
|
2838
|
+
id: zod.ZodString;
|
|
2839
|
+
prevId: zod.ZodString;
|
|
2840
|
+
}, "strip", zod.ZodTypeAny, {
|
|
2841
|
+
tables: Record<string, {
|
|
2842
|
+
name: string;
|
|
2843
|
+
columns: Record<string, {
|
|
2844
|
+
name: string;
|
|
2845
|
+
type: string;
|
|
2846
|
+
primaryKey: boolean;
|
|
2847
|
+
notNull: boolean;
|
|
2848
|
+
default?: any;
|
|
2849
|
+
isUnique?: any;
|
|
2850
|
+
generated?: {
|
|
2851
|
+
type: "stored";
|
|
2852
|
+
as: string;
|
|
2853
|
+
} | undefined;
|
|
2854
|
+
typeSchema?: string | undefined;
|
|
2855
|
+
uniqueName?: string | undefined;
|
|
2856
|
+
nullsNotDistinct?: boolean | undefined;
|
|
2857
|
+
identity?: {
|
|
2858
|
+
name: string;
|
|
2859
|
+
type: "always" | "byDefault";
|
|
2860
|
+
schema: string;
|
|
2861
|
+
increment?: string | undefined;
|
|
2862
|
+
minValue?: string | undefined;
|
|
2863
|
+
maxValue?: string | undefined;
|
|
2864
|
+
startWith?: string | undefined;
|
|
2865
|
+
cache?: string | undefined;
|
|
2866
|
+
cycle?: boolean | undefined;
|
|
2867
|
+
} | undefined;
|
|
2868
|
+
}>;
|
|
2869
|
+
indexes: Record<string, {
|
|
2870
|
+
name: string;
|
|
2871
|
+
columns: {
|
|
2872
|
+
isExpression: boolean;
|
|
2873
|
+
expression: string;
|
|
2874
|
+
asc: boolean;
|
|
2875
|
+
nulls?: string | undefined;
|
|
2876
|
+
opclass?: string | undefined;
|
|
2877
|
+
}[];
|
|
2878
|
+
isUnique: boolean;
|
|
2879
|
+
method: string;
|
|
2880
|
+
concurrently: boolean;
|
|
2881
|
+
with?: Record<string, any> | undefined;
|
|
2882
|
+
where?: string | undefined;
|
|
2883
|
+
}>;
|
|
2884
|
+
foreignKeys: Record<string, {
|
|
2885
|
+
name: string;
|
|
2886
|
+
tableFrom: string;
|
|
2887
|
+
columnsFrom: string[];
|
|
2888
|
+
tableTo: string;
|
|
2889
|
+
columnsTo: string[];
|
|
2890
|
+
onUpdate?: string | undefined;
|
|
2891
|
+
onDelete?: string | undefined;
|
|
2892
|
+
schemaTo?: string | undefined;
|
|
2893
|
+
}>;
|
|
2894
|
+
schema: string;
|
|
2895
|
+
compositePrimaryKeys: Record<string, {
|
|
2896
|
+
name: string;
|
|
2897
|
+
columns: string[];
|
|
2898
|
+
}>;
|
|
2899
|
+
uniqueConstraints: Record<string, {
|
|
2900
|
+
name: string;
|
|
2901
|
+
columns: string[];
|
|
2902
|
+
nullsNotDistinct: boolean;
|
|
2903
|
+
}>;
|
|
2904
|
+
checkConstraints: Record<string, {
|
|
2905
|
+
name: string;
|
|
2906
|
+
value: string;
|
|
2907
|
+
}>;
|
|
2908
|
+
policies: Record<string, {
|
|
2909
|
+
name: string;
|
|
2910
|
+
using?: string | undefined;
|
|
2911
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
2912
|
+
schema?: string | undefined;
|
|
2913
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
2914
|
+
to?: string[] | undefined;
|
|
2915
|
+
withCheck?: string | undefined;
|
|
2916
|
+
on?: string | undefined;
|
|
2917
|
+
}>;
|
|
2918
|
+
isRLSEnabled: boolean;
|
|
2919
|
+
}>;
|
|
2920
|
+
id: string;
|
|
2921
|
+
prevId: string;
|
|
2922
|
+
version: "7";
|
|
2923
|
+
dialect: "postgresql";
|
|
2924
|
+
schemas: Record<string, string>;
|
|
2925
|
+
_meta: {
|
|
2926
|
+
columns: Record<string, string>;
|
|
2927
|
+
tables: Record<string, string>;
|
|
2928
|
+
schemas: Record<string, string>;
|
|
2929
|
+
};
|
|
2930
|
+
views: Record<string, {
|
|
2931
|
+
name: string;
|
|
2932
|
+
columns: Record<string, {
|
|
2933
|
+
name: string;
|
|
2934
|
+
type: string;
|
|
2935
|
+
primaryKey: boolean;
|
|
2936
|
+
notNull: boolean;
|
|
2937
|
+
default?: any;
|
|
2938
|
+
isUnique?: any;
|
|
2939
|
+
generated?: {
|
|
2940
|
+
type: "stored";
|
|
2941
|
+
as: string;
|
|
2942
|
+
} | undefined;
|
|
2943
|
+
typeSchema?: string | undefined;
|
|
2944
|
+
uniqueName?: string | undefined;
|
|
2945
|
+
nullsNotDistinct?: boolean | undefined;
|
|
2946
|
+
identity?: {
|
|
2947
|
+
name: string;
|
|
2948
|
+
type: "always" | "byDefault";
|
|
2949
|
+
schema: string;
|
|
2950
|
+
increment?: string | undefined;
|
|
2951
|
+
minValue?: string | undefined;
|
|
2952
|
+
maxValue?: string | undefined;
|
|
2953
|
+
startWith?: string | undefined;
|
|
2954
|
+
cache?: string | undefined;
|
|
2955
|
+
cycle?: boolean | undefined;
|
|
2956
|
+
} | undefined;
|
|
2957
|
+
}>;
|
|
2958
|
+
schema: string;
|
|
2959
|
+
isExisting: boolean;
|
|
2960
|
+
materialized: boolean;
|
|
2961
|
+
using?: string | undefined;
|
|
2962
|
+
definition?: string | undefined;
|
|
2963
|
+
with?: {
|
|
2964
|
+
checkOption?: "local" | "cascaded" | undefined;
|
|
2965
|
+
securityBarrier?: boolean | undefined;
|
|
2966
|
+
securityInvoker?: boolean | undefined;
|
|
2967
|
+
fillfactor?: number | undefined;
|
|
2968
|
+
toastTupleTarget?: number | undefined;
|
|
2969
|
+
parallelWorkers?: number | undefined;
|
|
2970
|
+
autovacuumEnabled?: boolean | undefined;
|
|
2971
|
+
vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
|
|
2972
|
+
vacuumTruncate?: boolean | undefined;
|
|
2973
|
+
autovacuumVacuumThreshold?: number | undefined;
|
|
2974
|
+
autovacuumVacuumScaleFactor?: number | undefined;
|
|
2975
|
+
autovacuumVacuumCostDelay?: number | undefined;
|
|
2976
|
+
autovacuumVacuumCostLimit?: number | undefined;
|
|
2977
|
+
autovacuumFreezeMinAge?: number | undefined;
|
|
2978
|
+
autovacuumFreezeMaxAge?: number | undefined;
|
|
2979
|
+
autovacuumFreezeTableAge?: number | undefined;
|
|
2980
|
+
autovacuumMultixactFreezeMinAge?: number | undefined;
|
|
2981
|
+
autovacuumMultixactFreezeMaxAge?: number | undefined;
|
|
2982
|
+
autovacuumMultixactFreezeTableAge?: number | undefined;
|
|
2983
|
+
logAutovacuumMinDuration?: number | undefined;
|
|
2984
|
+
userCatalogTable?: boolean | undefined;
|
|
2985
|
+
} | undefined;
|
|
2986
|
+
withNoData?: boolean | undefined;
|
|
2987
|
+
tablespace?: string | undefined;
|
|
2988
|
+
}>;
|
|
2989
|
+
enums: Record<string, {
|
|
2990
|
+
name: string;
|
|
2991
|
+
values: string[];
|
|
2992
|
+
schema: string;
|
|
2993
|
+
}>;
|
|
2994
|
+
policies: Record<string, {
|
|
2995
|
+
name: string;
|
|
2996
|
+
using?: string | undefined;
|
|
2997
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
2998
|
+
schema?: string | undefined;
|
|
2999
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
3000
|
+
to?: string[] | undefined;
|
|
3001
|
+
withCheck?: string | undefined;
|
|
3002
|
+
on?: string | undefined;
|
|
3003
|
+
}>;
|
|
3004
|
+
sequences: Record<string, {
|
|
3005
|
+
name: string;
|
|
3006
|
+
schema: string;
|
|
3007
|
+
increment?: string | undefined;
|
|
3008
|
+
minValue?: string | undefined;
|
|
3009
|
+
maxValue?: string | undefined;
|
|
3010
|
+
startWith?: string | undefined;
|
|
3011
|
+
cache?: string | undefined;
|
|
3012
|
+
cycle?: boolean | undefined;
|
|
3013
|
+
}>;
|
|
3014
|
+
roles: Record<string, {
|
|
3015
|
+
name: string;
|
|
3016
|
+
createDb?: boolean | undefined;
|
|
3017
|
+
createRole?: boolean | undefined;
|
|
3018
|
+
inherit?: boolean | undefined;
|
|
3019
|
+
}>;
|
|
3020
|
+
internal?: {
|
|
3021
|
+
tables: Record<string, {
|
|
3022
|
+
columns: Record<string, {
|
|
3023
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
3024
|
+
isArray?: boolean | undefined;
|
|
3025
|
+
dimensions?: number | undefined;
|
|
3026
|
+
rawType?: string | undefined;
|
|
3027
|
+
} | undefined>;
|
|
3028
|
+
} | undefined>;
|
|
3029
|
+
} | undefined;
|
|
3030
|
+
}, {
|
|
3031
|
+
tables: Record<string, {
|
|
3032
|
+
name: string;
|
|
3033
|
+
columns: Record<string, {
|
|
3034
|
+
name: string;
|
|
3035
|
+
type: string;
|
|
3036
|
+
primaryKey: boolean;
|
|
3037
|
+
notNull: boolean;
|
|
3038
|
+
default?: any;
|
|
3039
|
+
isUnique?: any;
|
|
3040
|
+
generated?: {
|
|
3041
|
+
type: "stored";
|
|
3042
|
+
as: string;
|
|
3043
|
+
} | undefined;
|
|
3044
|
+
typeSchema?: string | undefined;
|
|
3045
|
+
uniqueName?: string | undefined;
|
|
3046
|
+
nullsNotDistinct?: boolean | undefined;
|
|
3047
|
+
identity?: {
|
|
3048
|
+
name: string;
|
|
3049
|
+
type: "always" | "byDefault";
|
|
3050
|
+
schema: string;
|
|
3051
|
+
increment?: string | undefined;
|
|
3052
|
+
minValue?: string | undefined;
|
|
3053
|
+
maxValue?: string | undefined;
|
|
3054
|
+
startWith?: string | undefined;
|
|
3055
|
+
cache?: string | undefined;
|
|
3056
|
+
cycle?: boolean | undefined;
|
|
3057
|
+
} | undefined;
|
|
3058
|
+
}>;
|
|
3059
|
+
indexes: Record<string, {
|
|
3060
|
+
name: string;
|
|
3061
|
+
columns: {
|
|
3062
|
+
isExpression: boolean;
|
|
3063
|
+
expression: string;
|
|
3064
|
+
asc: boolean;
|
|
3065
|
+
nulls?: string | undefined;
|
|
3066
|
+
opclass?: string | undefined;
|
|
3067
|
+
}[];
|
|
3068
|
+
isUnique: boolean;
|
|
3069
|
+
with?: Record<string, any> | undefined;
|
|
3070
|
+
method?: string | undefined;
|
|
3071
|
+
where?: string | undefined;
|
|
3072
|
+
concurrently?: boolean | undefined;
|
|
3073
|
+
}>;
|
|
3074
|
+
foreignKeys: Record<string, {
|
|
3075
|
+
name: string;
|
|
3076
|
+
tableFrom: string;
|
|
3077
|
+
columnsFrom: string[];
|
|
3078
|
+
tableTo: string;
|
|
3079
|
+
columnsTo: string[];
|
|
3080
|
+
onUpdate?: string | undefined;
|
|
3081
|
+
onDelete?: string | undefined;
|
|
3082
|
+
schemaTo?: string | undefined;
|
|
3083
|
+
}>;
|
|
3084
|
+
schema: string;
|
|
3085
|
+
compositePrimaryKeys: Record<string, {
|
|
3086
|
+
name: string;
|
|
3087
|
+
columns: string[];
|
|
3088
|
+
}>;
|
|
3089
|
+
uniqueConstraints?: Record<string, {
|
|
3090
|
+
name: string;
|
|
3091
|
+
columns: string[];
|
|
3092
|
+
nullsNotDistinct: boolean;
|
|
3093
|
+
}> | undefined;
|
|
3094
|
+
checkConstraints?: Record<string, {
|
|
3095
|
+
name: string;
|
|
3096
|
+
value: string;
|
|
3097
|
+
}> | undefined;
|
|
3098
|
+
policies?: Record<string, {
|
|
3099
|
+
name: string;
|
|
3100
|
+
using?: string | undefined;
|
|
3101
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
3102
|
+
schema?: string | undefined;
|
|
3103
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
3104
|
+
to?: string[] | undefined;
|
|
3105
|
+
withCheck?: string | undefined;
|
|
3106
|
+
on?: string | undefined;
|
|
3107
|
+
}> | undefined;
|
|
3108
|
+
isRLSEnabled?: boolean | undefined;
|
|
3109
|
+
}>;
|
|
3110
|
+
id: string;
|
|
3111
|
+
prevId: string;
|
|
3112
|
+
version: "7";
|
|
3113
|
+
dialect: "postgresql";
|
|
3114
|
+
schemas: Record<string, string>;
|
|
3115
|
+
_meta: {
|
|
3116
|
+
columns: Record<string, string>;
|
|
3117
|
+
tables: Record<string, string>;
|
|
3118
|
+
schemas: Record<string, string>;
|
|
3119
|
+
};
|
|
3120
|
+
enums: Record<string, {
|
|
3121
|
+
name: string;
|
|
3122
|
+
values: string[];
|
|
3123
|
+
schema: string;
|
|
3124
|
+
}>;
|
|
3125
|
+
internal?: {
|
|
3126
|
+
tables: Record<string, {
|
|
3127
|
+
columns: Record<string, {
|
|
3128
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
3129
|
+
isArray?: boolean | undefined;
|
|
3130
|
+
dimensions?: number | undefined;
|
|
3131
|
+
rawType?: string | undefined;
|
|
3132
|
+
} | undefined>;
|
|
3133
|
+
} | undefined>;
|
|
3134
|
+
} | undefined;
|
|
3135
|
+
views?: Record<string, {
|
|
3136
|
+
name: string;
|
|
3137
|
+
columns: Record<string, {
|
|
3138
|
+
name: string;
|
|
3139
|
+
type: string;
|
|
3140
|
+
primaryKey: boolean;
|
|
3141
|
+
notNull: boolean;
|
|
3142
|
+
default?: any;
|
|
3143
|
+
isUnique?: any;
|
|
3144
|
+
generated?: {
|
|
3145
|
+
type: "stored";
|
|
3146
|
+
as: string;
|
|
3147
|
+
} | undefined;
|
|
3148
|
+
typeSchema?: string | undefined;
|
|
3149
|
+
uniqueName?: string | undefined;
|
|
3150
|
+
nullsNotDistinct?: boolean | undefined;
|
|
3151
|
+
identity?: {
|
|
3152
|
+
name: string;
|
|
3153
|
+
type: "always" | "byDefault";
|
|
3154
|
+
schema: string;
|
|
3155
|
+
increment?: string | undefined;
|
|
3156
|
+
minValue?: string | undefined;
|
|
3157
|
+
maxValue?: string | undefined;
|
|
3158
|
+
startWith?: string | undefined;
|
|
3159
|
+
cache?: string | undefined;
|
|
3160
|
+
cycle?: boolean | undefined;
|
|
3161
|
+
} | undefined;
|
|
3162
|
+
}>;
|
|
3163
|
+
schema: string;
|
|
3164
|
+
isExisting: boolean;
|
|
3165
|
+
materialized: boolean;
|
|
3166
|
+
using?: string | undefined;
|
|
3167
|
+
definition?: string | undefined;
|
|
3168
|
+
with?: {
|
|
3169
|
+
checkOption?: "local" | "cascaded" | undefined;
|
|
3170
|
+
securityBarrier?: boolean | undefined;
|
|
3171
|
+
securityInvoker?: boolean | undefined;
|
|
3172
|
+
fillfactor?: number | undefined;
|
|
3173
|
+
toastTupleTarget?: number | undefined;
|
|
3174
|
+
parallelWorkers?: number | undefined;
|
|
3175
|
+
autovacuumEnabled?: boolean | undefined;
|
|
3176
|
+
vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
|
|
3177
|
+
vacuumTruncate?: boolean | undefined;
|
|
3178
|
+
autovacuumVacuumThreshold?: number | undefined;
|
|
3179
|
+
autovacuumVacuumScaleFactor?: number | undefined;
|
|
3180
|
+
autovacuumVacuumCostDelay?: number | undefined;
|
|
3181
|
+
autovacuumVacuumCostLimit?: number | undefined;
|
|
3182
|
+
autovacuumFreezeMinAge?: number | undefined;
|
|
3183
|
+
autovacuumFreezeMaxAge?: number | undefined;
|
|
3184
|
+
autovacuumFreezeTableAge?: number | undefined;
|
|
3185
|
+
autovacuumMultixactFreezeMinAge?: number | undefined;
|
|
3186
|
+
autovacuumMultixactFreezeMaxAge?: number | undefined;
|
|
3187
|
+
autovacuumMultixactFreezeTableAge?: number | undefined;
|
|
3188
|
+
logAutovacuumMinDuration?: number | undefined;
|
|
3189
|
+
userCatalogTable?: boolean | undefined;
|
|
3190
|
+
} | undefined;
|
|
3191
|
+
withNoData?: boolean | undefined;
|
|
3192
|
+
tablespace?: string | undefined;
|
|
3193
|
+
}> | undefined;
|
|
3194
|
+
policies?: Record<string, {
|
|
3195
|
+
name: string;
|
|
3196
|
+
using?: string | undefined;
|
|
3197
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
3198
|
+
schema?: string | undefined;
|
|
3199
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
3200
|
+
to?: string[] | undefined;
|
|
3201
|
+
withCheck?: string | undefined;
|
|
3202
|
+
on?: string | undefined;
|
|
3203
|
+
}> | undefined;
|
|
3204
|
+
sequences?: Record<string, {
|
|
3205
|
+
name: string;
|
|
3206
|
+
schema: string;
|
|
3207
|
+
increment?: string | undefined;
|
|
3208
|
+
minValue?: string | undefined;
|
|
3209
|
+
maxValue?: string | undefined;
|
|
3210
|
+
startWith?: string | undefined;
|
|
3211
|
+
cache?: string | undefined;
|
|
3212
|
+
cycle?: boolean | undefined;
|
|
3213
|
+
}> | undefined;
|
|
3214
|
+
roles?: Record<string, {
|
|
3215
|
+
name: string;
|
|
3216
|
+
createDb?: boolean | undefined;
|
|
3217
|
+
createRole?: boolean | undefined;
|
|
3218
|
+
inherit?: boolean | undefined;
|
|
3219
|
+
}> | undefined;
|
|
3220
|
+
}>;
|
|
3221
|
+
type PgSchema = TypeOf<typeof pgSchema>;
|
|
3222
|
+
|
|
3223
|
+
declare const schema$1: zod.ZodObject<{
|
|
3224
|
+
version: zod.ZodLiteral<"1">;
|
|
3225
|
+
dialect: zod.ZodLiteral<"singlestore">;
|
|
3226
|
+
tables: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
3227
|
+
name: zod.ZodString;
|
|
3228
|
+
columns: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
3229
|
+
name: zod.ZodString;
|
|
3230
|
+
type: zod.ZodString;
|
|
3231
|
+
primaryKey: zod.ZodBoolean;
|
|
3232
|
+
notNull: zod.ZodBoolean;
|
|
3233
|
+
autoincrement: zod.ZodOptional<zod.ZodBoolean>;
|
|
3234
|
+
default: zod.ZodOptional<zod.ZodAny>;
|
|
3235
|
+
onUpdate: zod.ZodOptional<zod.ZodAny>;
|
|
3236
|
+
generated: zod.ZodOptional<zod.ZodObject<{
|
|
3237
|
+
type: zod.ZodEnum<["stored", "virtual"]>;
|
|
3238
|
+
as: zod.ZodString;
|
|
3239
|
+
}, "strip", zod.ZodTypeAny, {
|
|
3240
|
+
type: "stored" | "virtual";
|
|
3241
|
+
as: string;
|
|
3242
|
+
}, {
|
|
3243
|
+
type: "stored" | "virtual";
|
|
3244
|
+
as: string;
|
|
3245
|
+
}>>;
|
|
3246
|
+
}, "strict", zod.ZodTypeAny, {
|
|
3247
|
+
name: string;
|
|
3248
|
+
type: string;
|
|
3249
|
+
primaryKey: boolean;
|
|
3250
|
+
notNull: boolean;
|
|
3251
|
+
default?: any;
|
|
3252
|
+
onUpdate?: any;
|
|
3253
|
+
autoincrement?: boolean | undefined;
|
|
3254
|
+
generated?: {
|
|
3255
|
+
type: "stored" | "virtual";
|
|
3256
|
+
as: string;
|
|
3257
|
+
} | undefined;
|
|
3258
|
+
}, {
|
|
3259
|
+
name: string;
|
|
3260
|
+
type: string;
|
|
3261
|
+
primaryKey: boolean;
|
|
3262
|
+
notNull: boolean;
|
|
3263
|
+
default?: any;
|
|
3264
|
+
onUpdate?: any;
|
|
3265
|
+
autoincrement?: boolean | undefined;
|
|
3266
|
+
generated?: {
|
|
3267
|
+
type: "stored" | "virtual";
|
|
3268
|
+
as: string;
|
|
3269
|
+
} | undefined;
|
|
3270
|
+
}>>;
|
|
3271
|
+
indexes: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
3272
|
+
name: zod.ZodString;
|
|
3273
|
+
columns: zod.ZodArray<zod.ZodString, "many">;
|
|
3274
|
+
isUnique: zod.ZodBoolean;
|
|
3275
|
+
using: zod.ZodOptional<zod.ZodEnum<["btree", "hash"]>>;
|
|
3276
|
+
algorithm: zod.ZodOptional<zod.ZodEnum<["default", "inplace", "copy"]>>;
|
|
3277
|
+
lock: zod.ZodOptional<zod.ZodEnum<["default", "none", "shared", "exclusive"]>>;
|
|
3278
|
+
}, "strict", zod.ZodTypeAny, {
|
|
3279
|
+
name: string;
|
|
3280
|
+
columns: string[];
|
|
3281
|
+
isUnique: boolean;
|
|
3282
|
+
using?: "btree" | "hash" | undefined;
|
|
3283
|
+
algorithm?: "default" | "inplace" | "copy" | undefined;
|
|
3284
|
+
lock?: "none" | "default" | "shared" | "exclusive" | undefined;
|
|
3285
|
+
}, {
|
|
3286
|
+
name: string;
|
|
3287
|
+
columns: string[];
|
|
3288
|
+
isUnique: boolean;
|
|
3289
|
+
using?: "btree" | "hash" | undefined;
|
|
3290
|
+
algorithm?: "default" | "inplace" | "copy" | undefined;
|
|
3291
|
+
lock?: "none" | "default" | "shared" | "exclusive" | undefined;
|
|
3292
|
+
}>>;
|
|
3293
|
+
compositePrimaryKeys: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
3294
|
+
name: zod.ZodString;
|
|
3295
|
+
columns: zod.ZodArray<zod.ZodString, "many">;
|
|
3296
|
+
}, "strict", zod.ZodTypeAny, {
|
|
3297
|
+
name: string;
|
|
3298
|
+
columns: string[];
|
|
3299
|
+
}, {
|
|
3300
|
+
name: string;
|
|
3301
|
+
columns: string[];
|
|
3302
|
+
}>>;
|
|
3303
|
+
uniqueConstraints: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
3304
|
+
name: zod.ZodString;
|
|
3305
|
+
columns: zod.ZodArray<zod.ZodString, "many">;
|
|
3306
|
+
}, "strict", zod.ZodTypeAny, {
|
|
3307
|
+
name: string;
|
|
3308
|
+
columns: string[];
|
|
3309
|
+
}, {
|
|
3310
|
+
name: string;
|
|
3311
|
+
columns: string[];
|
|
3312
|
+
}>>>;
|
|
3313
|
+
}, "strict", zod.ZodTypeAny, {
|
|
3314
|
+
name: string;
|
|
3315
|
+
columns: Record<string, {
|
|
3316
|
+
name: string;
|
|
3317
|
+
type: string;
|
|
3318
|
+
primaryKey: boolean;
|
|
3319
|
+
notNull: boolean;
|
|
3320
|
+
default?: any;
|
|
3321
|
+
onUpdate?: any;
|
|
3322
|
+
autoincrement?: boolean | undefined;
|
|
3323
|
+
generated?: {
|
|
3324
|
+
type: "stored" | "virtual";
|
|
3325
|
+
as: string;
|
|
3326
|
+
} | undefined;
|
|
3327
|
+
}>;
|
|
3328
|
+
indexes: Record<string, {
|
|
3329
|
+
name: string;
|
|
3330
|
+
columns: string[];
|
|
3331
|
+
isUnique: boolean;
|
|
3332
|
+
using?: "btree" | "hash" | undefined;
|
|
3333
|
+
algorithm?: "default" | "inplace" | "copy" | undefined;
|
|
3334
|
+
lock?: "none" | "default" | "shared" | "exclusive" | undefined;
|
|
3335
|
+
}>;
|
|
3336
|
+
compositePrimaryKeys: Record<string, {
|
|
3337
|
+
name: string;
|
|
3338
|
+
columns: string[];
|
|
3339
|
+
}>;
|
|
3340
|
+
uniqueConstraints: Record<string, {
|
|
3341
|
+
name: string;
|
|
3342
|
+
columns: string[];
|
|
3343
|
+
}>;
|
|
3344
|
+
}, {
|
|
3345
|
+
name: string;
|
|
3346
|
+
columns: Record<string, {
|
|
3347
|
+
name: string;
|
|
3348
|
+
type: string;
|
|
3349
|
+
primaryKey: boolean;
|
|
3350
|
+
notNull: boolean;
|
|
3351
|
+
default?: any;
|
|
3352
|
+
onUpdate?: any;
|
|
3353
|
+
autoincrement?: boolean | undefined;
|
|
3354
|
+
generated?: {
|
|
3355
|
+
type: "stored" | "virtual";
|
|
3356
|
+
as: string;
|
|
3357
|
+
} | undefined;
|
|
3358
|
+
}>;
|
|
3359
|
+
indexes: Record<string, {
|
|
3360
|
+
name: string;
|
|
3361
|
+
columns: string[];
|
|
3362
|
+
isUnique: boolean;
|
|
3363
|
+
using?: "btree" | "hash" | undefined;
|
|
3364
|
+
algorithm?: "default" | "inplace" | "copy" | undefined;
|
|
3365
|
+
lock?: "none" | "default" | "shared" | "exclusive" | undefined;
|
|
3366
|
+
}>;
|
|
3367
|
+
compositePrimaryKeys: Record<string, {
|
|
3368
|
+
name: string;
|
|
3369
|
+
columns: string[];
|
|
3370
|
+
}>;
|
|
3371
|
+
uniqueConstraints?: Record<string, {
|
|
3372
|
+
name: string;
|
|
3373
|
+
columns: string[];
|
|
3374
|
+
}> | undefined;
|
|
3375
|
+
}>>;
|
|
3376
|
+
_meta: zod.ZodObject<{
|
|
3377
|
+
tables: zod.ZodRecord<zod.ZodString, zod.ZodString>;
|
|
3378
|
+
columns: zod.ZodRecord<zod.ZodString, zod.ZodString>;
|
|
3379
|
+
}, "strip", zod.ZodTypeAny, {
|
|
3380
|
+
columns: Record<string, string>;
|
|
3381
|
+
tables: Record<string, string>;
|
|
3382
|
+
}, {
|
|
3383
|
+
columns: Record<string, string>;
|
|
3384
|
+
tables: Record<string, string>;
|
|
3385
|
+
}>;
|
|
3386
|
+
internal: zod.ZodOptional<zod.ZodObject<{
|
|
3387
|
+
tables: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodOptional<zod.ZodObject<{
|
|
3388
|
+
columns: zod.ZodRecord<zod.ZodString, zod.ZodOptional<zod.ZodObject<{
|
|
3389
|
+
isDefaultAnExpression: zod.ZodOptional<zod.ZodBoolean>;
|
|
3390
|
+
}, "strip", zod.ZodTypeAny, {
|
|
3391
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
3392
|
+
}, {
|
|
3393
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
3394
|
+
}>>>;
|
|
3395
|
+
}, "strip", zod.ZodTypeAny, {
|
|
3396
|
+
columns: Record<string, {
|
|
3397
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
3398
|
+
} | undefined>;
|
|
3399
|
+
}, {
|
|
3400
|
+
columns: Record<string, {
|
|
3401
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
3402
|
+
} | undefined>;
|
|
3403
|
+
}>>>>;
|
|
3404
|
+
indexes: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodOptional<zod.ZodObject<{
|
|
3405
|
+
columns: zod.ZodRecord<zod.ZodString, zod.ZodOptional<zod.ZodObject<{
|
|
3406
|
+
isExpression: zod.ZodOptional<zod.ZodBoolean>;
|
|
3407
|
+
}, "strip", zod.ZodTypeAny, {
|
|
3408
|
+
isExpression?: boolean | undefined;
|
|
3409
|
+
}, {
|
|
3410
|
+
isExpression?: boolean | undefined;
|
|
3411
|
+
}>>>;
|
|
3412
|
+
}, "strip", zod.ZodTypeAny, {
|
|
3413
|
+
columns: Record<string, {
|
|
3414
|
+
isExpression?: boolean | undefined;
|
|
3415
|
+
} | undefined>;
|
|
3416
|
+
}, {
|
|
3417
|
+
columns: Record<string, {
|
|
3418
|
+
isExpression?: boolean | undefined;
|
|
3419
|
+
} | undefined>;
|
|
3420
|
+
}>>>>;
|
|
3421
|
+
}, "strip", zod.ZodTypeAny, {
|
|
3422
|
+
indexes?: Record<string, {
|
|
3423
|
+
columns: Record<string, {
|
|
3424
|
+
isExpression?: boolean | undefined;
|
|
3425
|
+
} | undefined>;
|
|
3426
|
+
} | undefined> | undefined;
|
|
3427
|
+
tables?: Record<string, {
|
|
3428
|
+
columns: Record<string, {
|
|
3429
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
3430
|
+
} | undefined>;
|
|
3431
|
+
} | undefined> | undefined;
|
|
3432
|
+
}, {
|
|
3433
|
+
indexes?: Record<string, {
|
|
3434
|
+
columns: Record<string, {
|
|
3435
|
+
isExpression?: boolean | undefined;
|
|
3436
|
+
} | undefined>;
|
|
3437
|
+
} | undefined> | undefined;
|
|
3438
|
+
tables?: Record<string, {
|
|
3439
|
+
columns: Record<string, {
|
|
3440
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
3441
|
+
} | undefined>;
|
|
3442
|
+
} | undefined> | undefined;
|
|
3443
|
+
}>>;
|
|
3444
|
+
} & {
|
|
3445
|
+
id: zod.ZodString;
|
|
3446
|
+
prevId: zod.ZodString;
|
|
3447
|
+
}, "strip", zod.ZodTypeAny, {
|
|
3448
|
+
tables: Record<string, {
|
|
3449
|
+
name: string;
|
|
3450
|
+
columns: Record<string, {
|
|
3451
|
+
name: string;
|
|
3452
|
+
type: string;
|
|
3453
|
+
primaryKey: boolean;
|
|
3454
|
+
notNull: boolean;
|
|
3455
|
+
default?: any;
|
|
3456
|
+
onUpdate?: any;
|
|
3457
|
+
autoincrement?: boolean | undefined;
|
|
3458
|
+
generated?: {
|
|
3459
|
+
type: "stored" | "virtual";
|
|
3460
|
+
as: string;
|
|
3461
|
+
} | undefined;
|
|
3462
|
+
}>;
|
|
3463
|
+
indexes: Record<string, {
|
|
3464
|
+
name: string;
|
|
3465
|
+
columns: string[];
|
|
3466
|
+
isUnique: boolean;
|
|
3467
|
+
using?: "btree" | "hash" | undefined;
|
|
3468
|
+
algorithm?: "default" | "inplace" | "copy" | undefined;
|
|
3469
|
+
lock?: "none" | "default" | "shared" | "exclusive" | undefined;
|
|
3470
|
+
}>;
|
|
3471
|
+
compositePrimaryKeys: Record<string, {
|
|
3472
|
+
name: string;
|
|
3473
|
+
columns: string[];
|
|
3474
|
+
}>;
|
|
3475
|
+
uniqueConstraints: Record<string, {
|
|
3476
|
+
name: string;
|
|
3477
|
+
columns: string[];
|
|
3478
|
+
}>;
|
|
3479
|
+
}>;
|
|
3480
|
+
id: string;
|
|
3481
|
+
prevId: string;
|
|
3482
|
+
version: "1";
|
|
3483
|
+
dialect: "singlestore";
|
|
3484
|
+
_meta: {
|
|
3485
|
+
columns: Record<string, string>;
|
|
3486
|
+
tables: Record<string, string>;
|
|
3487
|
+
};
|
|
3488
|
+
internal?: {
|
|
3489
|
+
indexes?: Record<string, {
|
|
3490
|
+
columns: Record<string, {
|
|
3491
|
+
isExpression?: boolean | undefined;
|
|
3492
|
+
} | undefined>;
|
|
3493
|
+
} | undefined> | undefined;
|
|
3494
|
+
tables?: Record<string, {
|
|
3495
|
+
columns: Record<string, {
|
|
3496
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
3497
|
+
} | undefined>;
|
|
3498
|
+
} | undefined> | undefined;
|
|
3499
|
+
} | undefined;
|
|
3500
|
+
}, {
|
|
3501
|
+
tables: Record<string, {
|
|
3502
|
+
name: string;
|
|
3503
|
+
columns: Record<string, {
|
|
3504
|
+
name: string;
|
|
3505
|
+
type: string;
|
|
3506
|
+
primaryKey: boolean;
|
|
3507
|
+
notNull: boolean;
|
|
3508
|
+
default?: any;
|
|
3509
|
+
onUpdate?: any;
|
|
3510
|
+
autoincrement?: boolean | undefined;
|
|
3511
|
+
generated?: {
|
|
3512
|
+
type: "stored" | "virtual";
|
|
3513
|
+
as: string;
|
|
3514
|
+
} | undefined;
|
|
3515
|
+
}>;
|
|
3516
|
+
indexes: Record<string, {
|
|
3517
|
+
name: string;
|
|
3518
|
+
columns: string[];
|
|
3519
|
+
isUnique: boolean;
|
|
3520
|
+
using?: "btree" | "hash" | undefined;
|
|
3521
|
+
algorithm?: "default" | "inplace" | "copy" | undefined;
|
|
3522
|
+
lock?: "none" | "default" | "shared" | "exclusive" | undefined;
|
|
3523
|
+
}>;
|
|
3524
|
+
compositePrimaryKeys: Record<string, {
|
|
3525
|
+
name: string;
|
|
3526
|
+
columns: string[];
|
|
3527
|
+
}>;
|
|
3528
|
+
uniqueConstraints?: Record<string, {
|
|
3529
|
+
name: string;
|
|
3530
|
+
columns: string[];
|
|
3531
|
+
}> | undefined;
|
|
3532
|
+
}>;
|
|
3533
|
+
id: string;
|
|
3534
|
+
prevId: string;
|
|
3535
|
+
version: "1";
|
|
3536
|
+
dialect: "singlestore";
|
|
3537
|
+
_meta: {
|
|
3538
|
+
columns: Record<string, string>;
|
|
3539
|
+
tables: Record<string, string>;
|
|
3540
|
+
};
|
|
3541
|
+
internal?: {
|
|
3542
|
+
indexes?: Record<string, {
|
|
3543
|
+
columns: Record<string, {
|
|
3544
|
+
isExpression?: boolean | undefined;
|
|
3545
|
+
} | undefined>;
|
|
3546
|
+
} | undefined> | undefined;
|
|
3547
|
+
tables?: Record<string, {
|
|
3548
|
+
columns: Record<string, {
|
|
3549
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
3550
|
+
} | undefined>;
|
|
3551
|
+
} | undefined> | undefined;
|
|
3552
|
+
} | undefined;
|
|
3553
|
+
}>;
|
|
3554
|
+
type SingleStoreSchema = TypeOf<typeof schema$1>;
|
|
3555
|
+
|
|
3556
|
+
declare const schema$3: zod.ZodObject<{
|
|
3557
|
+
version: zod.ZodLiteral<"6">;
|
|
3558
|
+
dialect: zod.ZodEnum<["sqlite"]>;
|
|
3559
|
+
tables: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
3560
|
+
name: zod.ZodString;
|
|
3561
|
+
columns: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
3562
|
+
name: zod.ZodString;
|
|
3563
|
+
type: zod.ZodString;
|
|
3564
|
+
primaryKey: zod.ZodBoolean;
|
|
3565
|
+
notNull: zod.ZodBoolean;
|
|
3566
|
+
autoincrement: zod.ZodOptional<zod.ZodBoolean>;
|
|
3567
|
+
default: zod.ZodOptional<zod.ZodAny>;
|
|
3568
|
+
generated: zod.ZodOptional<zod.ZodObject<{
|
|
3569
|
+
type: zod.ZodEnum<["stored", "virtual"]>;
|
|
3570
|
+
as: zod.ZodString;
|
|
3571
|
+
}, "strip", zod.ZodTypeAny, {
|
|
3572
|
+
type: "stored" | "virtual";
|
|
3573
|
+
as: string;
|
|
3574
|
+
}, {
|
|
3575
|
+
type: "stored" | "virtual";
|
|
3576
|
+
as: string;
|
|
3577
|
+
}>>;
|
|
3578
|
+
}, "strict", zod.ZodTypeAny, {
|
|
3579
|
+
name: string;
|
|
3580
|
+
type: string;
|
|
3581
|
+
primaryKey: boolean;
|
|
3582
|
+
notNull: boolean;
|
|
3583
|
+
default?: any;
|
|
3584
|
+
autoincrement?: boolean | undefined;
|
|
3585
|
+
generated?: {
|
|
3586
|
+
type: "stored" | "virtual";
|
|
3587
|
+
as: string;
|
|
3588
|
+
} | undefined;
|
|
3589
|
+
}, {
|
|
3590
|
+
name: string;
|
|
3591
|
+
type: string;
|
|
3592
|
+
primaryKey: boolean;
|
|
3593
|
+
notNull: boolean;
|
|
3594
|
+
default?: any;
|
|
3595
|
+
autoincrement?: boolean | undefined;
|
|
3596
|
+
generated?: {
|
|
3597
|
+
type: "stored" | "virtual";
|
|
3598
|
+
as: string;
|
|
3599
|
+
} | undefined;
|
|
3600
|
+
}>>;
|
|
3601
|
+
indexes: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
3602
|
+
name: zod.ZodString;
|
|
3603
|
+
columns: zod.ZodArray<zod.ZodString, "many">;
|
|
3604
|
+
where: zod.ZodOptional<zod.ZodString>;
|
|
3605
|
+
isUnique: zod.ZodBoolean;
|
|
3606
|
+
}, "strict", zod.ZodTypeAny, {
|
|
3607
|
+
name: string;
|
|
3608
|
+
columns: string[];
|
|
3609
|
+
isUnique: boolean;
|
|
3610
|
+
where?: string | undefined;
|
|
3611
|
+
}, {
|
|
3612
|
+
name: string;
|
|
3613
|
+
columns: string[];
|
|
3614
|
+
isUnique: boolean;
|
|
3615
|
+
where?: string | undefined;
|
|
3616
|
+
}>>;
|
|
3617
|
+
foreignKeys: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
3618
|
+
name: zod.ZodString;
|
|
3619
|
+
tableFrom: zod.ZodString;
|
|
3620
|
+
columnsFrom: zod.ZodArray<zod.ZodString, "many">;
|
|
3621
|
+
tableTo: zod.ZodString;
|
|
3622
|
+
columnsTo: zod.ZodArray<zod.ZodString, "many">;
|
|
3623
|
+
onUpdate: zod.ZodOptional<zod.ZodString>;
|
|
3624
|
+
onDelete: zod.ZodOptional<zod.ZodString>;
|
|
3625
|
+
}, "strict", zod.ZodTypeAny, {
|
|
3626
|
+
name: string;
|
|
3627
|
+
tableFrom: string;
|
|
3628
|
+
columnsFrom: string[];
|
|
3629
|
+
tableTo: string;
|
|
3630
|
+
columnsTo: string[];
|
|
3631
|
+
onUpdate?: string | undefined;
|
|
3632
|
+
onDelete?: string | undefined;
|
|
3633
|
+
}, {
|
|
3634
|
+
name: string;
|
|
3635
|
+
tableFrom: string;
|
|
3636
|
+
columnsFrom: string[];
|
|
3637
|
+
tableTo: string;
|
|
3638
|
+
columnsTo: string[];
|
|
3639
|
+
onUpdate?: string | undefined;
|
|
3640
|
+
onDelete?: string | undefined;
|
|
3641
|
+
}>>;
|
|
3642
|
+
compositePrimaryKeys: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
3643
|
+
columns: zod.ZodArray<zod.ZodString, "many">;
|
|
3644
|
+
name: zod.ZodOptional<zod.ZodString>;
|
|
3645
|
+
}, "strict", zod.ZodTypeAny, {
|
|
3646
|
+
columns: string[];
|
|
3647
|
+
name?: string | undefined;
|
|
3648
|
+
}, {
|
|
3649
|
+
columns: string[];
|
|
3650
|
+
name?: string | undefined;
|
|
3651
|
+
}>>;
|
|
3652
|
+
uniqueConstraints: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
3653
|
+
name: zod.ZodString;
|
|
3654
|
+
columns: zod.ZodArray<zod.ZodString, "many">;
|
|
3655
|
+
}, "strict", zod.ZodTypeAny, {
|
|
3656
|
+
name: string;
|
|
3657
|
+
columns: string[];
|
|
3658
|
+
}, {
|
|
3659
|
+
name: string;
|
|
3660
|
+
columns: string[];
|
|
3661
|
+
}>>>;
|
|
3662
|
+
checkConstraints: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
3663
|
+
name: zod.ZodString;
|
|
3664
|
+
value: zod.ZodString;
|
|
3665
|
+
}, "strict", zod.ZodTypeAny, {
|
|
3666
|
+
name: string;
|
|
3667
|
+
value: string;
|
|
3668
|
+
}, {
|
|
3669
|
+
name: string;
|
|
3670
|
+
value: string;
|
|
3671
|
+
}>>>;
|
|
3672
|
+
}, "strict", zod.ZodTypeAny, {
|
|
3673
|
+
name: string;
|
|
3674
|
+
columns: Record<string, {
|
|
3675
|
+
name: string;
|
|
3676
|
+
type: string;
|
|
3677
|
+
primaryKey: boolean;
|
|
3678
|
+
notNull: boolean;
|
|
3679
|
+
default?: any;
|
|
3680
|
+
autoincrement?: boolean | undefined;
|
|
3681
|
+
generated?: {
|
|
3682
|
+
type: "stored" | "virtual";
|
|
3683
|
+
as: string;
|
|
3684
|
+
} | undefined;
|
|
3685
|
+
}>;
|
|
3686
|
+
indexes: Record<string, {
|
|
3687
|
+
name: string;
|
|
3688
|
+
columns: string[];
|
|
3689
|
+
isUnique: boolean;
|
|
3690
|
+
where?: string | undefined;
|
|
3691
|
+
}>;
|
|
3692
|
+
foreignKeys: Record<string, {
|
|
3693
|
+
name: string;
|
|
3694
|
+
tableFrom: string;
|
|
3695
|
+
columnsFrom: string[];
|
|
3696
|
+
tableTo: string;
|
|
3697
|
+
columnsTo: string[];
|
|
3698
|
+
onUpdate?: string | undefined;
|
|
3699
|
+
onDelete?: string | undefined;
|
|
3700
|
+
}>;
|
|
3701
|
+
compositePrimaryKeys: Record<string, {
|
|
3702
|
+
columns: string[];
|
|
3703
|
+
name?: string | undefined;
|
|
3704
|
+
}>;
|
|
3705
|
+
uniqueConstraints: Record<string, {
|
|
3706
|
+
name: string;
|
|
3707
|
+
columns: string[];
|
|
3708
|
+
}>;
|
|
3709
|
+
checkConstraints: Record<string, {
|
|
3710
|
+
name: string;
|
|
3711
|
+
value: string;
|
|
3712
|
+
}>;
|
|
3713
|
+
}, {
|
|
3714
|
+
name: string;
|
|
3715
|
+
columns: Record<string, {
|
|
3716
|
+
name: string;
|
|
3717
|
+
type: string;
|
|
3718
|
+
primaryKey: boolean;
|
|
3719
|
+
notNull: boolean;
|
|
3720
|
+
default?: any;
|
|
3721
|
+
autoincrement?: boolean | undefined;
|
|
3722
|
+
generated?: {
|
|
3723
|
+
type: "stored" | "virtual";
|
|
3724
|
+
as: string;
|
|
3725
|
+
} | undefined;
|
|
3726
|
+
}>;
|
|
3727
|
+
indexes: Record<string, {
|
|
3728
|
+
name: string;
|
|
3729
|
+
columns: string[];
|
|
3730
|
+
isUnique: boolean;
|
|
3731
|
+
where?: string | undefined;
|
|
3732
|
+
}>;
|
|
3733
|
+
foreignKeys: Record<string, {
|
|
3734
|
+
name: string;
|
|
3735
|
+
tableFrom: string;
|
|
3736
|
+
columnsFrom: string[];
|
|
3737
|
+
tableTo: string;
|
|
3738
|
+
columnsTo: string[];
|
|
3739
|
+
onUpdate?: string | undefined;
|
|
3740
|
+
onDelete?: string | undefined;
|
|
3741
|
+
}>;
|
|
3742
|
+
compositePrimaryKeys: Record<string, {
|
|
3743
|
+
columns: string[];
|
|
3744
|
+
name?: string | undefined;
|
|
3745
|
+
}>;
|
|
3746
|
+
uniqueConstraints?: Record<string, {
|
|
3747
|
+
name: string;
|
|
3748
|
+
columns: string[];
|
|
3749
|
+
}> | undefined;
|
|
3750
|
+
checkConstraints?: Record<string, {
|
|
3751
|
+
name: string;
|
|
3752
|
+
value: string;
|
|
3753
|
+
}> | undefined;
|
|
3754
|
+
}>>;
|
|
3755
|
+
views: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
3756
|
+
name: zod.ZodString;
|
|
3757
|
+
columns: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
|
3758
|
+
name: zod.ZodString;
|
|
3759
|
+
type: zod.ZodString;
|
|
3760
|
+
primaryKey: zod.ZodBoolean;
|
|
3761
|
+
notNull: zod.ZodBoolean;
|
|
3762
|
+
autoincrement: zod.ZodOptional<zod.ZodBoolean>;
|
|
3763
|
+
default: zod.ZodOptional<zod.ZodAny>;
|
|
3764
|
+
generated: zod.ZodOptional<zod.ZodObject<{
|
|
3765
|
+
type: zod.ZodEnum<["stored", "virtual"]>;
|
|
3766
|
+
as: zod.ZodString;
|
|
3767
|
+
}, "strip", zod.ZodTypeAny, {
|
|
3768
|
+
type: "stored" | "virtual";
|
|
3769
|
+
as: string;
|
|
3770
|
+
}, {
|
|
3771
|
+
type: "stored" | "virtual";
|
|
3772
|
+
as: string;
|
|
3773
|
+
}>>;
|
|
3774
|
+
}, "strict", zod.ZodTypeAny, {
|
|
3775
|
+
name: string;
|
|
3776
|
+
type: string;
|
|
3777
|
+
primaryKey: boolean;
|
|
3778
|
+
notNull: boolean;
|
|
3779
|
+
default?: any;
|
|
3780
|
+
autoincrement?: boolean | undefined;
|
|
3781
|
+
generated?: {
|
|
3782
|
+
type: "stored" | "virtual";
|
|
3783
|
+
as: string;
|
|
3784
|
+
} | undefined;
|
|
3785
|
+
}, {
|
|
3786
|
+
name: string;
|
|
3787
|
+
type: string;
|
|
3788
|
+
primaryKey: boolean;
|
|
3789
|
+
notNull: boolean;
|
|
3790
|
+
default?: any;
|
|
3791
|
+
autoincrement?: boolean | undefined;
|
|
3792
|
+
generated?: {
|
|
3793
|
+
type: "stored" | "virtual";
|
|
3794
|
+
as: string;
|
|
3795
|
+
} | undefined;
|
|
3796
|
+
}>>;
|
|
3797
|
+
definition: zod.ZodOptional<zod.ZodString>;
|
|
3798
|
+
isExisting: zod.ZodBoolean;
|
|
3799
|
+
}, "strict", zod.ZodTypeAny, {
|
|
3800
|
+
name: string;
|
|
3801
|
+
columns: Record<string, {
|
|
3802
|
+
name: string;
|
|
3803
|
+
type: string;
|
|
3804
|
+
primaryKey: boolean;
|
|
3805
|
+
notNull: boolean;
|
|
3806
|
+
default?: any;
|
|
3807
|
+
autoincrement?: boolean | undefined;
|
|
3808
|
+
generated?: {
|
|
3809
|
+
type: "stored" | "virtual";
|
|
3810
|
+
as: string;
|
|
3811
|
+
} | undefined;
|
|
3812
|
+
}>;
|
|
3813
|
+
isExisting: boolean;
|
|
3814
|
+
definition?: string | undefined;
|
|
3815
|
+
}, {
|
|
3816
|
+
name: string;
|
|
3817
|
+
columns: Record<string, {
|
|
3818
|
+
name: string;
|
|
3819
|
+
type: string;
|
|
3820
|
+
primaryKey: boolean;
|
|
3821
|
+
notNull: boolean;
|
|
3822
|
+
default?: any;
|
|
3823
|
+
autoincrement?: boolean | undefined;
|
|
3824
|
+
generated?: {
|
|
3825
|
+
type: "stored" | "virtual";
|
|
3826
|
+
as: string;
|
|
3827
|
+
} | undefined;
|
|
3828
|
+
}>;
|
|
3829
|
+
isExisting: boolean;
|
|
3830
|
+
definition?: string | undefined;
|
|
3831
|
+
}>>>;
|
|
3832
|
+
enums: zod.ZodObject<{}, "strip", zod.ZodTypeAny, {}, {}>;
|
|
3833
|
+
_meta: zod.ZodObject<{
|
|
3834
|
+
tables: zod.ZodRecord<zod.ZodString, zod.ZodString>;
|
|
3835
|
+
columns: zod.ZodRecord<zod.ZodString, zod.ZodString>;
|
|
3836
|
+
}, "strip", zod.ZodTypeAny, {
|
|
3837
|
+
columns: Record<string, string>;
|
|
3838
|
+
tables: Record<string, string>;
|
|
3839
|
+
}, {
|
|
3840
|
+
columns: Record<string, string>;
|
|
3841
|
+
tables: Record<string, string>;
|
|
3842
|
+
}>;
|
|
3843
|
+
internal: zod.ZodOptional<zod.ZodObject<{
|
|
3844
|
+
indexes: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodOptional<zod.ZodObject<{
|
|
3845
|
+
columns: zod.ZodRecord<zod.ZodString, zod.ZodOptional<zod.ZodObject<{
|
|
3846
|
+
isExpression: zod.ZodOptional<zod.ZodBoolean>;
|
|
3847
|
+
}, "strip", zod.ZodTypeAny, {
|
|
3848
|
+
isExpression?: boolean | undefined;
|
|
3849
|
+
}, {
|
|
3850
|
+
isExpression?: boolean | undefined;
|
|
3851
|
+
}>>>;
|
|
3852
|
+
}, "strip", zod.ZodTypeAny, {
|
|
3853
|
+
columns: Record<string, {
|
|
3854
|
+
isExpression?: boolean | undefined;
|
|
3855
|
+
} | undefined>;
|
|
3856
|
+
}, {
|
|
3857
|
+
columns: Record<string, {
|
|
3858
|
+
isExpression?: boolean | undefined;
|
|
3859
|
+
} | undefined>;
|
|
3860
|
+
}>>>>;
|
|
3861
|
+
}, "strip", zod.ZodTypeAny, {
|
|
3862
|
+
indexes?: Record<string, {
|
|
3863
|
+
columns: Record<string, {
|
|
3864
|
+
isExpression?: boolean | undefined;
|
|
3865
|
+
} | undefined>;
|
|
3866
|
+
} | undefined> | undefined;
|
|
3867
|
+
}, {
|
|
3868
|
+
indexes?: Record<string, {
|
|
3869
|
+
columns: Record<string, {
|
|
3870
|
+
isExpression?: boolean | undefined;
|
|
3871
|
+
} | undefined>;
|
|
3872
|
+
} | undefined> | undefined;
|
|
3873
|
+
}>>;
|
|
3874
|
+
} & {
|
|
3875
|
+
id: zod.ZodString;
|
|
3876
|
+
prevId: zod.ZodString;
|
|
3877
|
+
}, "strict", zod.ZodTypeAny, {
|
|
3878
|
+
tables: Record<string, {
|
|
3879
|
+
name: string;
|
|
3880
|
+
columns: Record<string, {
|
|
3881
|
+
name: string;
|
|
3882
|
+
type: string;
|
|
3883
|
+
primaryKey: boolean;
|
|
3884
|
+
notNull: boolean;
|
|
3885
|
+
default?: any;
|
|
3886
|
+
autoincrement?: boolean | undefined;
|
|
3887
|
+
generated?: {
|
|
3888
|
+
type: "stored" | "virtual";
|
|
3889
|
+
as: string;
|
|
3890
|
+
} | undefined;
|
|
3891
|
+
}>;
|
|
3892
|
+
indexes: Record<string, {
|
|
3893
|
+
name: string;
|
|
3894
|
+
columns: string[];
|
|
3895
|
+
isUnique: boolean;
|
|
3896
|
+
where?: string | undefined;
|
|
3897
|
+
}>;
|
|
3898
|
+
foreignKeys: Record<string, {
|
|
3899
|
+
name: string;
|
|
3900
|
+
tableFrom: string;
|
|
3901
|
+
columnsFrom: string[];
|
|
3902
|
+
tableTo: string;
|
|
3903
|
+
columnsTo: string[];
|
|
3904
|
+
onUpdate?: string | undefined;
|
|
3905
|
+
onDelete?: string | undefined;
|
|
3906
|
+
}>;
|
|
3907
|
+
compositePrimaryKeys: Record<string, {
|
|
3908
|
+
columns: string[];
|
|
3909
|
+
name?: string | undefined;
|
|
3910
|
+
}>;
|
|
3911
|
+
uniqueConstraints: Record<string, {
|
|
3912
|
+
name: string;
|
|
3913
|
+
columns: string[];
|
|
3914
|
+
}>;
|
|
3915
|
+
checkConstraints: Record<string, {
|
|
3916
|
+
name: string;
|
|
3917
|
+
value: string;
|
|
3918
|
+
}>;
|
|
3919
|
+
}>;
|
|
3920
|
+
id: string;
|
|
3921
|
+
prevId: string;
|
|
3922
|
+
version: "6";
|
|
3923
|
+
dialect: "sqlite";
|
|
3924
|
+
_meta: {
|
|
3925
|
+
columns: Record<string, string>;
|
|
3926
|
+
tables: Record<string, string>;
|
|
3927
|
+
};
|
|
3928
|
+
views: Record<string, {
|
|
3929
|
+
name: string;
|
|
3930
|
+
columns: Record<string, {
|
|
3931
|
+
name: string;
|
|
3932
|
+
type: string;
|
|
3933
|
+
primaryKey: boolean;
|
|
3934
|
+
notNull: boolean;
|
|
3935
|
+
default?: any;
|
|
3936
|
+
autoincrement?: boolean | undefined;
|
|
3937
|
+
generated?: {
|
|
3938
|
+
type: "stored" | "virtual";
|
|
3939
|
+
as: string;
|
|
3940
|
+
} | undefined;
|
|
3941
|
+
}>;
|
|
3942
|
+
isExisting: boolean;
|
|
3943
|
+
definition?: string | undefined;
|
|
3944
|
+
}>;
|
|
3945
|
+
enums: {};
|
|
3946
|
+
internal?: {
|
|
3947
|
+
indexes?: Record<string, {
|
|
3948
|
+
columns: Record<string, {
|
|
3949
|
+
isExpression?: boolean | undefined;
|
|
3950
|
+
} | undefined>;
|
|
3951
|
+
} | undefined> | undefined;
|
|
3952
|
+
} | undefined;
|
|
3953
|
+
}, {
|
|
3954
|
+
tables: Record<string, {
|
|
3955
|
+
name: string;
|
|
3956
|
+
columns: Record<string, {
|
|
3957
|
+
name: string;
|
|
3958
|
+
type: string;
|
|
3959
|
+
primaryKey: boolean;
|
|
3960
|
+
notNull: boolean;
|
|
3961
|
+
default?: any;
|
|
3962
|
+
autoincrement?: boolean | undefined;
|
|
3963
|
+
generated?: {
|
|
3964
|
+
type: "stored" | "virtual";
|
|
3965
|
+
as: string;
|
|
3966
|
+
} | undefined;
|
|
3967
|
+
}>;
|
|
3968
|
+
indexes: Record<string, {
|
|
3969
|
+
name: string;
|
|
3970
|
+
columns: string[];
|
|
3971
|
+
isUnique: boolean;
|
|
3972
|
+
where?: string | undefined;
|
|
3973
|
+
}>;
|
|
3974
|
+
foreignKeys: Record<string, {
|
|
3975
|
+
name: string;
|
|
3976
|
+
tableFrom: string;
|
|
3977
|
+
columnsFrom: string[];
|
|
3978
|
+
tableTo: string;
|
|
3979
|
+
columnsTo: string[];
|
|
3980
|
+
onUpdate?: string | undefined;
|
|
3981
|
+
onDelete?: string | undefined;
|
|
3982
|
+
}>;
|
|
3983
|
+
compositePrimaryKeys: Record<string, {
|
|
3984
|
+
columns: string[];
|
|
3985
|
+
name?: string | undefined;
|
|
3986
|
+
}>;
|
|
3987
|
+
uniqueConstraints?: Record<string, {
|
|
3988
|
+
name: string;
|
|
3989
|
+
columns: string[];
|
|
3990
|
+
}> | undefined;
|
|
3991
|
+
checkConstraints?: Record<string, {
|
|
3992
|
+
name: string;
|
|
3993
|
+
value: string;
|
|
3994
|
+
}> | undefined;
|
|
3995
|
+
}>;
|
|
3996
|
+
id: string;
|
|
3997
|
+
prevId: string;
|
|
3998
|
+
version: "6";
|
|
3999
|
+
dialect: "sqlite";
|
|
4000
|
+
_meta: {
|
|
4001
|
+
columns: Record<string, string>;
|
|
4002
|
+
tables: Record<string, string>;
|
|
4003
|
+
};
|
|
4004
|
+
enums: {};
|
|
4005
|
+
internal?: {
|
|
4006
|
+
indexes?: Record<string, {
|
|
4007
|
+
columns: Record<string, {
|
|
4008
|
+
isExpression?: boolean | undefined;
|
|
4009
|
+
} | undefined>;
|
|
4010
|
+
} | undefined> | undefined;
|
|
4011
|
+
} | undefined;
|
|
4012
|
+
views?: Record<string, {
|
|
4013
|
+
name: string;
|
|
4014
|
+
columns: Record<string, {
|
|
4015
|
+
name: string;
|
|
4016
|
+
type: string;
|
|
4017
|
+
primaryKey: boolean;
|
|
4018
|
+
notNull: boolean;
|
|
4019
|
+
default?: any;
|
|
4020
|
+
autoincrement?: boolean | undefined;
|
|
4021
|
+
generated?: {
|
|
4022
|
+
type: "stored" | "virtual";
|
|
4023
|
+
as: string;
|
|
4024
|
+
} | undefined;
|
|
4025
|
+
}>;
|
|
4026
|
+
isExisting: boolean;
|
|
4027
|
+
definition?: string | undefined;
|
|
4028
|
+
}> | undefined;
|
|
4029
|
+
}>;
|
|
4030
|
+
type SQLiteSchema = TypeOf<typeof schema$3>;
|
|
4031
|
+
|
|
4032
|
+
type DrizzleSnapshotJSON = PgSchema;
|
|
4033
|
+
type DrizzleSQLiteSnapshotJSON = SQLiteSchema;
|
|
4034
|
+
type DrizzleMySQLSnapshotJSON = MySqlSchema;
|
|
4035
|
+
type DrizzleSingleStoreSnapshotJSON = SingleStoreSchema;
|
|
4036
|
+
declare const generateDrizzleJson: (imports: Record<string, unknown>, prevId?: string, schemaFilters?: string[], casing?: CasingType) => PgSchema;
|
|
4037
|
+
declare const generateMigration: (prev: DrizzleSnapshotJSON, cur: DrizzleSnapshotJSON) => Promise<string[]>;
|
|
4038
|
+
declare const pushSchema: (imports: Record<string, unknown>, drizzleInstance: PgDatabase<any>, schemaFilters?: string[], tablesFilter?: string[], extensionsFilters?: Config["extensionsFilters"]) => Promise<{
|
|
4039
|
+
hasDataLoss: boolean;
|
|
4040
|
+
warnings: string[];
|
|
4041
|
+
statementsToExecute: string[];
|
|
4042
|
+
apply: () => Promise<void>;
|
|
4043
|
+
}>;
|
|
4044
|
+
declare const generateSQLiteDrizzleJson: (imports: Record<string, unknown>, prevId?: string, casing?: CasingType) => Promise<SQLiteSchema>;
|
|
4045
|
+
declare const generateSQLiteMigration: (prev: DrizzleSQLiteSnapshotJSON, cur: DrizzleSQLiteSnapshotJSON) => Promise<string[]>;
|
|
4046
|
+
declare const pushSQLiteSchema: (imports: Record<string, unknown>, drizzleInstance: LibSQLDatabase<any>) => Promise<{
|
|
4047
|
+
hasDataLoss: boolean;
|
|
4048
|
+
warnings: string[];
|
|
4049
|
+
statementsToExecute: string[];
|
|
4050
|
+
apply: () => Promise<void>;
|
|
4051
|
+
}>;
|
|
4052
|
+
declare const generateMySQLDrizzleJson: (imports: Record<string, unknown>, prevId?: string, casing?: CasingType) => Promise<MySqlSchema>;
|
|
4053
|
+
declare const generateMySQLMigration: (prev: DrizzleMySQLSnapshotJSON, cur: DrizzleMySQLSnapshotJSON) => Promise<string[]>;
|
|
4054
|
+
declare const pushMySQLSchema: (imports: Record<string, unknown>, drizzleInstance: MySql2Database<any>, databaseName: string) => Promise<{
|
|
4055
|
+
hasDataLoss: boolean;
|
|
4056
|
+
warnings: string[];
|
|
4057
|
+
statementsToExecute: string[];
|
|
4058
|
+
apply: () => Promise<void>;
|
|
4059
|
+
}>;
|
|
4060
|
+
declare const generateSingleStoreDrizzleJson: (imports: Record<string, unknown>, prevId?: string, casing?: CasingType) => Promise<SingleStoreSchema>;
|
|
4061
|
+
declare const generateSingleStoreMigration: (prev: DrizzleSingleStoreSnapshotJSON, cur: DrizzleSingleStoreSnapshotJSON) => Promise<string[]>;
|
|
4062
|
+
declare const pushSingleStoreSchema: (imports: Record<string, unknown>, drizzleInstance: SingleStoreDriverDatabase<any>, databaseName: string) => Promise<{
|
|
4063
|
+
hasDataLoss: boolean;
|
|
4064
|
+
warnings: string[];
|
|
4065
|
+
statementsToExecute: string[];
|
|
4066
|
+
apply: () => Promise<void>;
|
|
4067
|
+
}>;
|
|
4068
|
+
declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
|
|
4069
|
+
tables: Record<string, {
|
|
4070
|
+
name: string;
|
|
4071
|
+
columns: Record<string, {
|
|
4072
|
+
name: string;
|
|
4073
|
+
type: string;
|
|
4074
|
+
primaryKey: boolean;
|
|
4075
|
+
notNull: boolean;
|
|
4076
|
+
default?: any;
|
|
4077
|
+
isUnique?: any;
|
|
4078
|
+
generated?: {
|
|
4079
|
+
type: "stored";
|
|
4080
|
+
as: string;
|
|
4081
|
+
} | undefined;
|
|
4082
|
+
typeSchema?: string | undefined;
|
|
4083
|
+
uniqueName?: string | undefined;
|
|
4084
|
+
nullsNotDistinct?: boolean | undefined;
|
|
4085
|
+
identity?: {
|
|
4086
|
+
name: string;
|
|
4087
|
+
type: "always" | "byDefault";
|
|
4088
|
+
schema: string;
|
|
4089
|
+
increment?: string | undefined;
|
|
4090
|
+
minValue?: string | undefined;
|
|
4091
|
+
maxValue?: string | undefined;
|
|
4092
|
+
startWith?: string | undefined;
|
|
4093
|
+
cache?: string | undefined;
|
|
4094
|
+
cycle?: boolean | undefined;
|
|
4095
|
+
} | undefined;
|
|
4096
|
+
}>;
|
|
4097
|
+
indexes: Record<string, {
|
|
4098
|
+
name: string;
|
|
4099
|
+
columns: {
|
|
4100
|
+
isExpression: boolean;
|
|
4101
|
+
expression: string;
|
|
4102
|
+
asc: boolean;
|
|
4103
|
+
nulls?: string | undefined;
|
|
4104
|
+
opclass?: string | undefined;
|
|
4105
|
+
}[];
|
|
4106
|
+
isUnique: boolean;
|
|
4107
|
+
method: string;
|
|
4108
|
+
concurrently: boolean;
|
|
4109
|
+
with?: Record<string, any> | undefined;
|
|
4110
|
+
where?: string | undefined;
|
|
4111
|
+
}>;
|
|
4112
|
+
foreignKeys: Record<string, {
|
|
4113
|
+
name: string;
|
|
4114
|
+
tableFrom: string;
|
|
4115
|
+
columnsFrom: string[];
|
|
4116
|
+
tableTo: string;
|
|
4117
|
+
columnsTo: string[];
|
|
4118
|
+
onUpdate?: string | undefined;
|
|
4119
|
+
onDelete?: string | undefined;
|
|
4120
|
+
schemaTo?: string | undefined;
|
|
4121
|
+
}>;
|
|
4122
|
+
schema: string;
|
|
4123
|
+
compositePrimaryKeys: Record<string, {
|
|
4124
|
+
name: string;
|
|
4125
|
+
columns: string[];
|
|
4126
|
+
}>;
|
|
4127
|
+
uniqueConstraints: Record<string, {
|
|
4128
|
+
name: string;
|
|
4129
|
+
columns: string[];
|
|
4130
|
+
nullsNotDistinct: boolean;
|
|
4131
|
+
}>;
|
|
4132
|
+
checkConstraints: Record<string, {
|
|
4133
|
+
name: string;
|
|
4134
|
+
value: string;
|
|
4135
|
+
}>;
|
|
4136
|
+
policies: Record<string, {
|
|
4137
|
+
name: string;
|
|
4138
|
+
using?: string | undefined;
|
|
4139
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
4140
|
+
schema?: string | undefined;
|
|
4141
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
4142
|
+
to?: string[] | undefined;
|
|
4143
|
+
withCheck?: string | undefined;
|
|
4144
|
+
on?: string | undefined;
|
|
4145
|
+
}>;
|
|
4146
|
+
isRLSEnabled: boolean;
|
|
4147
|
+
}>;
|
|
4148
|
+
id: string;
|
|
4149
|
+
prevId: string;
|
|
4150
|
+
version: "7";
|
|
4151
|
+
dialect: "postgresql";
|
|
4152
|
+
schemas: Record<string, string>;
|
|
4153
|
+
_meta: {
|
|
4154
|
+
columns: Record<string, string>;
|
|
4155
|
+
tables: Record<string, string>;
|
|
4156
|
+
schemas: Record<string, string>;
|
|
4157
|
+
};
|
|
4158
|
+
views: Record<string, {
|
|
4159
|
+
name: string;
|
|
4160
|
+
columns: Record<string, {
|
|
4161
|
+
name: string;
|
|
4162
|
+
type: string;
|
|
4163
|
+
primaryKey: boolean;
|
|
4164
|
+
notNull: boolean;
|
|
4165
|
+
default?: any;
|
|
4166
|
+
isUnique?: any;
|
|
4167
|
+
generated?: {
|
|
4168
|
+
type: "stored";
|
|
4169
|
+
as: string;
|
|
4170
|
+
} | undefined;
|
|
4171
|
+
typeSchema?: string | undefined;
|
|
4172
|
+
uniqueName?: string | undefined;
|
|
4173
|
+
nullsNotDistinct?: boolean | undefined;
|
|
4174
|
+
identity?: {
|
|
4175
|
+
name: string;
|
|
4176
|
+
type: "always" | "byDefault";
|
|
4177
|
+
schema: string;
|
|
4178
|
+
increment?: string | undefined;
|
|
4179
|
+
minValue?: string | undefined;
|
|
4180
|
+
maxValue?: string | undefined;
|
|
4181
|
+
startWith?: string | undefined;
|
|
4182
|
+
cache?: string | undefined;
|
|
4183
|
+
cycle?: boolean | undefined;
|
|
4184
|
+
} | undefined;
|
|
4185
|
+
}>;
|
|
4186
|
+
schema: string;
|
|
4187
|
+
isExisting: boolean;
|
|
4188
|
+
materialized: boolean;
|
|
4189
|
+
using?: string | undefined;
|
|
4190
|
+
definition?: string | undefined;
|
|
4191
|
+
with?: {
|
|
4192
|
+
checkOption?: "local" | "cascaded" | undefined;
|
|
4193
|
+
securityBarrier?: boolean | undefined;
|
|
4194
|
+
securityInvoker?: boolean | undefined;
|
|
4195
|
+
fillfactor?: number | undefined;
|
|
4196
|
+
toastTupleTarget?: number | undefined;
|
|
4197
|
+
parallelWorkers?: number | undefined;
|
|
4198
|
+
autovacuumEnabled?: boolean | undefined;
|
|
4199
|
+
vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
|
|
4200
|
+
vacuumTruncate?: boolean | undefined;
|
|
4201
|
+
autovacuumVacuumThreshold?: number | undefined;
|
|
4202
|
+
autovacuumVacuumScaleFactor?: number | undefined;
|
|
4203
|
+
autovacuumVacuumCostDelay?: number | undefined;
|
|
4204
|
+
autovacuumVacuumCostLimit?: number | undefined;
|
|
4205
|
+
autovacuumFreezeMinAge?: number | undefined;
|
|
4206
|
+
autovacuumFreezeMaxAge?: number | undefined;
|
|
4207
|
+
autovacuumFreezeTableAge?: number | undefined;
|
|
4208
|
+
autovacuumMultixactFreezeMinAge?: number | undefined;
|
|
4209
|
+
autovacuumMultixactFreezeMaxAge?: number | undefined;
|
|
4210
|
+
autovacuumMultixactFreezeTableAge?: number | undefined;
|
|
4211
|
+
logAutovacuumMinDuration?: number | undefined;
|
|
4212
|
+
userCatalogTable?: boolean | undefined;
|
|
4213
|
+
} | undefined;
|
|
4214
|
+
withNoData?: boolean | undefined;
|
|
4215
|
+
tablespace?: string | undefined;
|
|
4216
|
+
}>;
|
|
4217
|
+
enums: Record<string, {
|
|
4218
|
+
name: string;
|
|
4219
|
+
values: string[];
|
|
4220
|
+
schema: string;
|
|
4221
|
+
}>;
|
|
4222
|
+
policies: Record<string, {
|
|
4223
|
+
name: string;
|
|
4224
|
+
using?: string | undefined;
|
|
4225
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
4226
|
+
schema?: string | undefined;
|
|
4227
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
4228
|
+
to?: string[] | undefined;
|
|
4229
|
+
withCheck?: string | undefined;
|
|
4230
|
+
on?: string | undefined;
|
|
4231
|
+
}>;
|
|
4232
|
+
sequences: Record<string, {
|
|
4233
|
+
name: string;
|
|
4234
|
+
schema: string;
|
|
4235
|
+
increment?: string | undefined;
|
|
4236
|
+
minValue?: string | undefined;
|
|
4237
|
+
maxValue?: string | undefined;
|
|
4238
|
+
startWith?: string | undefined;
|
|
4239
|
+
cache?: string | undefined;
|
|
4240
|
+
cycle?: boolean | undefined;
|
|
4241
|
+
}>;
|
|
4242
|
+
roles: Record<string, {
|
|
4243
|
+
name: string;
|
|
4244
|
+
createDb?: boolean | undefined;
|
|
4245
|
+
createRole?: boolean | undefined;
|
|
4246
|
+
inherit?: boolean | undefined;
|
|
4247
|
+
}>;
|
|
4248
|
+
internal?: {
|
|
4249
|
+
tables: Record<string, {
|
|
4250
|
+
columns: Record<string, {
|
|
4251
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
4252
|
+
isArray?: boolean | undefined;
|
|
4253
|
+
dimensions?: number | undefined;
|
|
4254
|
+
rawType?: string | undefined;
|
|
4255
|
+
} | undefined>;
|
|
4256
|
+
} | undefined>;
|
|
4257
|
+
} | undefined;
|
|
4258
|
+
} | Record<string, unknown>;
|
|
4259
|
+
|
|
4260
|
+
type DrizzleKit_DrizzleMySQLSnapshotJSON = DrizzleMySQLSnapshotJSON;
|
|
4261
|
+
type DrizzleKit_DrizzleSQLiteSnapshotJSON = DrizzleSQLiteSnapshotJSON;
|
|
4262
|
+
type DrizzleKit_DrizzleSingleStoreSnapshotJSON = DrizzleSingleStoreSnapshotJSON;
|
|
4263
|
+
type DrizzleKit_DrizzleSnapshotJSON = DrizzleSnapshotJSON;
|
|
4264
|
+
declare const DrizzleKit_generateDrizzleJson: typeof generateDrizzleJson;
|
|
4265
|
+
declare const DrizzleKit_generateMigration: typeof generateMigration;
|
|
4266
|
+
declare const DrizzleKit_generateMySQLDrizzleJson: typeof generateMySQLDrizzleJson;
|
|
4267
|
+
declare const DrizzleKit_generateMySQLMigration: typeof generateMySQLMigration;
|
|
4268
|
+
declare const DrizzleKit_generateSQLiteDrizzleJson: typeof generateSQLiteDrizzleJson;
|
|
4269
|
+
declare const DrizzleKit_generateSQLiteMigration: typeof generateSQLiteMigration;
|
|
4270
|
+
declare const DrizzleKit_generateSingleStoreDrizzleJson: typeof generateSingleStoreDrizzleJson;
|
|
4271
|
+
declare const DrizzleKit_generateSingleStoreMigration: typeof generateSingleStoreMigration;
|
|
4272
|
+
declare const DrizzleKit_pushMySQLSchema: typeof pushMySQLSchema;
|
|
4273
|
+
declare const DrizzleKit_pushSQLiteSchema: typeof pushSQLiteSchema;
|
|
4274
|
+
declare const DrizzleKit_pushSchema: typeof pushSchema;
|
|
4275
|
+
declare const DrizzleKit_pushSingleStoreSchema: typeof pushSingleStoreSchema;
|
|
4276
|
+
declare const DrizzleKit_upPgSnapshot: typeof upPgSnapshot;
|
|
4277
|
+
declare namespace DrizzleKit {
|
|
4278
|
+
export { type DrizzleKit_DrizzleMySQLSnapshotJSON as DrizzleMySQLSnapshotJSON, type DrizzleKit_DrizzleSQLiteSnapshotJSON as DrizzleSQLiteSnapshotJSON, type DrizzleKit_DrizzleSingleStoreSnapshotJSON as DrizzleSingleStoreSnapshotJSON, type DrizzleKit_DrizzleSnapshotJSON as DrizzleSnapshotJSON, DrizzleKit_generateDrizzleJson as generateDrizzleJson, DrizzleKit_generateMigration as generateMigration, DrizzleKit_generateMySQLDrizzleJson as generateMySQLDrizzleJson, DrizzleKit_generateMySQLMigration as generateMySQLMigration, DrizzleKit_generateSQLiteDrizzleJson as generateSQLiteDrizzleJson, DrizzleKit_generateSQLiteMigration as generateSQLiteMigration, DrizzleKit_generateSingleStoreDrizzleJson as generateSingleStoreDrizzleJson, DrizzleKit_generateSingleStoreMigration as generateSingleStoreMigration, DrizzleKit_pushMySQLSchema as pushMySQLSchema, DrizzleKit_pushSQLiteSchema as pushSQLiteSchema, DrizzleKit_pushSchema as pushSchema, DrizzleKit_pushSingleStoreSchema as pushSingleStoreSchema, DrizzleKit_upPgSnapshot as upPgSnapshot };
|
|
4279
|
+
}
|
|
1150
4280
|
|
|
1151
4281
|
declare class RepositoryDescriptorProvider {
|
|
1152
4282
|
protected readonly log: _alepha_core.Logger;
|
|
1153
4283
|
protected readonly alepha: Alepha;
|
|
1154
4284
|
protected readonly repositories: Array<Repository<any, TObject>>;
|
|
1155
4285
|
constructor();
|
|
4286
|
+
clearRepositories(): Promise<void>;
|
|
1156
4287
|
protected readonly configure: _alepha_core.HookDescriptor<"configure">;
|
|
1157
4288
|
/**
|
|
1158
4289
|
* Get all repositories.
|
|
@@ -1187,7 +4318,8 @@ declare class RepositoryDescriptorProvider {
|
|
|
1187
4318
|
declare class DrizzleKitProvider {
|
|
1188
4319
|
protected readonly log: _alepha_core.Logger;
|
|
1189
4320
|
protected readonly alepha: Alepha;
|
|
1190
|
-
protected readonly
|
|
4321
|
+
protected readonly repositoryProvider: RepositoryDescriptorProvider;
|
|
4322
|
+
push(provider: PostgresProvider, schema?: string): Promise<void>;
|
|
1191
4323
|
/**
|
|
1192
4324
|
* Try to generate migrations from scratch based on the models.
|
|
1193
4325
|
* Then, execute the migrations.
|
|
@@ -1201,12 +4333,20 @@ declare class DrizzleKitProvider {
|
|
|
1201
4333
|
* @returns A promise that resolves once the migrations have been executed.
|
|
1202
4334
|
*/
|
|
1203
4335
|
synchronize(provider: PostgresProvider, schema?: string): Promise<void>;
|
|
4336
|
+
protected getTables(provider: PostgresProvider, schema?: string): Promise<Record<string, any>>;
|
|
4337
|
+
protected loadMigrationSnapshot(provider: PostgresProvider): Promise<any>;
|
|
4338
|
+
protected saveMigrationSnapshot(provider: PostgresProvider, curr: Record<string, any>, entry?: {
|
|
4339
|
+
id: number;
|
|
4340
|
+
snapshot: string;
|
|
4341
|
+
}): Promise<void>;
|
|
4342
|
+
protected executeStatements(statements: string[], provider: PostgresProvider, _schema?: string, catchErrors?: boolean): Promise<void>;
|
|
4343
|
+
protected prepareSchema(schemaName: string, provider: PostgresProvider, repositories: any[]): Promise<void>;
|
|
1204
4344
|
/**
|
|
1205
4345
|
* Get the Drizzle Kit API.
|
|
1206
4346
|
*
|
|
1207
4347
|
* @protected
|
|
1208
4348
|
*/
|
|
1209
|
-
protected importDrizzleKit():
|
|
4349
|
+
protected importDrizzleKit(): typeof DrizzleKit;
|
|
1210
4350
|
}
|
|
1211
4351
|
|
|
1212
4352
|
declare module "alepha" {
|
|
@@ -1226,14 +4366,6 @@ declare const envSchema$1: _alepha_core.TObject<{
|
|
|
1226
4366
|
*
|
|
1227
4367
|
*/
|
|
1228
4368
|
DATABASE_MIGRATIONS_FOLDER: _sinclair_typebox.TString;
|
|
1229
|
-
/**
|
|
1230
|
-
*
|
|
1231
|
-
*/
|
|
1232
|
-
DATABASE_MIGRATIONS_SCHEMA: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1233
|
-
/**
|
|
1234
|
-
*
|
|
1235
|
-
*/
|
|
1236
|
-
DATABASE_MIGRATIONS_TABLE: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1237
4369
|
/**
|
|
1238
4370
|
* The schema to use.
|
|
1239
4371
|
* Accept a string.
|
|
@@ -1247,7 +4379,15 @@ declare const envSchema$1: _alepha_core.TObject<{
|
|
|
1247
4379
|
*/
|
|
1248
4380
|
POSTGRES_SYNCHRONIZE: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
1249
4381
|
/**
|
|
4382
|
+
* Push the schema to the database.
|
|
1250
4383
|
*
|
|
4384
|
+
* @default false
|
|
4385
|
+
*/
|
|
4386
|
+
POSTGRES_PUSH_SCHEMA: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
4387
|
+
/**
|
|
4388
|
+
* Reject unauthorized SSL connections.
|
|
4389
|
+
*
|
|
4390
|
+
* @default false
|
|
1251
4391
|
*/
|
|
1252
4392
|
POSTGRES_REJECT_UNAUTHORIZED: _sinclair_typebox.TBoolean;
|
|
1253
4393
|
}>;
|
|
@@ -1263,10 +4403,9 @@ declare class NodePostgresProvider implements PostgresProvider {
|
|
|
1263
4403
|
PG_USERNAME?: string | undefined;
|
|
1264
4404
|
PG_DATABASE?: string | undefined;
|
|
1265
4405
|
PG_PASSWORD?: string | undefined;
|
|
1266
|
-
DATABASE_MIGRATIONS_SCHEMA?: string | undefined;
|
|
1267
|
-
DATABASE_MIGRATIONS_TABLE?: string | undefined;
|
|
1268
4406
|
POSTGRES_SCHEMA?: string | undefined;
|
|
1269
4407
|
POSTGRES_SYNCHRONIZE?: boolean | undefined;
|
|
4408
|
+
POSTGRES_PUSH_SCHEMA?: boolean | undefined;
|
|
1270
4409
|
DATABASE_URL: string;
|
|
1271
4410
|
DATABASE_MIGRATIONS_FOLDER: string;
|
|
1272
4411
|
POSTGRES_REJECT_UNAUTHORIZED: boolean;
|
|
@@ -1307,6 +4446,9 @@ type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & {
|
|
|
1307
4446
|
|
|
1308
4447
|
declare const createdAtSchema: PgAttr<PgAttr<_sinclair_typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
1309
4448
|
|
|
4449
|
+
/**
|
|
4450
|
+
* @deprecated Use `pg.primaryKey()` instead.
|
|
4451
|
+
*/
|
|
1310
4452
|
declare const legacyIdSchema: PgAttr<PgAttr<PgAttr<_sinclair_typebox.TInteger, typeof PG_PRIMARY_KEY>, typeof PG_SERIAL>, typeof PG_DEFAULT>;
|
|
1311
4453
|
|
|
1312
4454
|
/**
|
|
@@ -1352,41 +4494,49 @@ declare module "alepha/core" {
|
|
|
1352
4494
|
}
|
|
1353
4495
|
declare class PostgresTypeProvider {
|
|
1354
4496
|
readonly attr: <T extends TSchema, Attr extends PgSymbolKeys>(type: T, attr: Attr, value?: PgSymbols[Attr]) => PgAttr<T, Attr>;
|
|
1355
|
-
readonly serial: () => PgAttr<_sinclair_typebox.TInteger, typeof PG_SERIAL>;
|
|
1356
|
-
readonly identity: (options?: IntegerOptions) => PgAttr<_sinclair_typebox.TInteger, typeof PG_IDENTITY>;
|
|
1357
|
-
readonly id: (options?: IntegerOptions) => PgAttr<PgAttr<PgAttr<_sinclair_typebox.TInteger, typeof PG_IDENTITY>, typeof PG_DEFAULT>, typeof PG_PRIMARY_KEY>;
|
|
1358
|
-
readonly identityPrimaryKey: (options?: IntegerOptions) => PgAttr<PgAttr<PgAttr<_sinclair_typebox.TInteger, typeof PG_PRIMARY_KEY>, typeof PG_IDENTITY>, typeof PG_DEFAULT>;
|
|
1359
|
-
readonly primaryKey: <T extends TSchema>(type: T) => PgAttr<PgAttr<T, PgDefault>, PgPrimaryKey>;
|
|
1360
4497
|
/**
|
|
1361
|
-
*
|
|
1362
|
-
|
|
1363
|
-
|
|
4498
|
+
* Creates a primary key with an identity column.
|
|
4499
|
+
*/
|
|
4500
|
+
readonly identityPrimaryKey: (identity?: PgIdentityOptions, options?: IntegerOptions) => PgAttr<PgAttr<PgAttr<_sinclair_typebox.TInteger, typeof PG_PRIMARY_KEY>, typeof PG_IDENTITY>, typeof PG_DEFAULT>;
|
|
4501
|
+
/**
|
|
4502
|
+
* Creates a primary key with a big identity column. (default)
|
|
1364
4503
|
*/
|
|
1365
|
-
readonly
|
|
4504
|
+
readonly bigIdentityPrimaryKey: (identity?: PgIdentityOptions, options?: NumberOptions) => PgAttr<PgAttr<PgAttr<_sinclair_typebox.TNumber, typeof PG_PRIMARY_KEY>, typeof PG_IDENTITY>, typeof PG_DEFAULT>;
|
|
4505
|
+
/**
|
|
4506
|
+
* Creates a primary key with a UUID column.
|
|
4507
|
+
*/
|
|
4508
|
+
readonly uuidPrimaryKey: () => PgAttr<PgAttr<_sinclair_typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
1366
4509
|
/**
|
|
1367
4510
|
*
|
|
1368
|
-
* @
|
|
4511
|
+
* @alias bigIdentityPrimaryKey
|
|
4512
|
+
*/
|
|
4513
|
+
readonly primaryKey: (identity?: PgIdentityOptions, options?: NumberOptions) => PgAttr<PgAttr<PgAttr<_sinclair_typebox.TNumber, typeof PG_PRIMARY_KEY>, typeof PG_IDENTITY>, typeof PG_DEFAULT>;
|
|
4514
|
+
/**
|
|
4515
|
+
* Wrap a schema with "default" attribute.
|
|
4516
|
+
* This is used to set a default value for a column in the database.
|
|
4517
|
+
*/
|
|
4518
|
+
readonly default: <T extends TSchema>(type: T, value?: Static<T>) => PgAttr<T, PgDefault>;
|
|
4519
|
+
/**
|
|
4520
|
+
* Creates a column version.
|
|
4521
|
+
* This is used to track the version of a row in the database.
|
|
4522
|
+
* You can use it for optimistic concurrency control.
|
|
1369
4523
|
*/
|
|
1370
4524
|
readonly version: (options?: IntegerOptions) => PgAttr<PgAttr<_sinclair_typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
1371
4525
|
/**
|
|
1372
|
-
*
|
|
1373
|
-
* @param options
|
|
4526
|
+
* Creates a column Created At. So just a datetime column with a default value of the current timestamp.
|
|
1374
4527
|
*/
|
|
1375
4528
|
readonly createdAt: (options?: StringOptions) => PgAttr<PgAttr<_sinclair_typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
1376
4529
|
/**
|
|
1377
|
-
*
|
|
1378
|
-
* @param options
|
|
4530
|
+
* Creates a column Updated At. Like createdAt, but it is updated on every update of the row.
|
|
1379
4531
|
*/
|
|
1380
4532
|
readonly updatedAt: (options?: StringOptions) => PgAttr<PgAttr<_sinclair_typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
1381
4533
|
/**
|
|
1382
|
-
*
|
|
1383
|
-
* @param properties
|
|
1384
|
-
* @param options
|
|
4534
|
+
* @deprecated Build your own entity schema.
|
|
1385
4535
|
*/
|
|
1386
4536
|
readonly entity: <T extends TProperties>(properties: T, options?: ObjectOptions) => TEntity<T>;
|
|
1387
4537
|
/**
|
|
1388
|
-
*
|
|
1389
|
-
*
|
|
4538
|
+
* Creates an insert schema for a given object schema.
|
|
4539
|
+
* - pg.default will be optional
|
|
1390
4540
|
*/
|
|
1391
4541
|
readonly insert: <T extends TObject>(obj: T) => TInsertObject<T>;
|
|
1392
4542
|
/**
|
|
@@ -1394,25 +4544,27 @@ declare class PostgresTypeProvider {
|
|
|
1394
4544
|
*/
|
|
1395
4545
|
readonly input: <T extends TObject>(obj: T) => TInsertObject<T>;
|
|
1396
4546
|
/**
|
|
1397
|
-
*
|
|
1398
|
-
* @param resource
|
|
1399
|
-
* @param options
|
|
4547
|
+
* Creates a page schema for a given object schema.
|
|
1400
4548
|
*/
|
|
1401
4549
|
readonly page: <T extends TObject>(resource: T, options?: ObjectOptions) => TPage<T>;
|
|
1402
4550
|
/**
|
|
1403
|
-
*
|
|
1404
|
-
* @param type
|
|
1405
|
-
* @param ref
|
|
1406
|
-
* @param actions
|
|
4551
|
+
* Creates a reference to another table or schema.
|
|
1407
4552
|
*/
|
|
1408
4553
|
readonly ref: <T extends TSchema>(type: T, ref: () => any, actions?: {
|
|
1409
4554
|
onUpdate?: UpdateDeleteAction$1;
|
|
1410
4555
|
onDelete?: UpdateDeleteAction$1;
|
|
1411
4556
|
}) => PgAttr<T, PgRef>;
|
|
1412
4557
|
/**
|
|
4558
|
+
* @alias ref
|
|
4559
|
+
*/
|
|
4560
|
+
references: <T extends TSchema>(type: T, ref: () => any, actions?: {
|
|
4561
|
+
onUpdate?: UpdateDeleteAction$1;
|
|
4562
|
+
onDelete?: UpdateDeleteAction$1;
|
|
4563
|
+
}) => PgAttr<T, PgRef>;
|
|
4564
|
+
/**
|
|
4565
|
+
* Creates a reference to another table or schema with a foreign key.
|
|
1413
4566
|
*
|
|
1414
|
-
* @
|
|
1415
|
-
* @param foreignKey
|
|
4567
|
+
* @experimental
|
|
1416
4568
|
*/
|
|
1417
4569
|
readonly many: <T extends TObject, Config extends TableConfig$1>(table: PgTableWithColumnsAndSchema<Config, T>, foreignKey: keyof T["properties"]) => TOptionalWithFlag<PgAttr<PgAttr<TArray<T>, PgMany>, PgDefault>, true>;
|
|
1418
4570
|
}
|
|
@@ -1450,4 +4602,4 @@ declare class PostgresModule {
|
|
|
1450
4602
|
protected getDefaultProviderName(): "pg";
|
|
1451
4603
|
}
|
|
1452
4604
|
|
|
1453
|
-
export { $entity, $repository, $sequence, $
|
|
4605
|
+
export { $entity, $repository, $sequence, $transaction, type BaseEntity, type BaseEntityKeys, DrizzleKitProvider, type Entity, type EntityDescriptorOptions, EntityNotFoundError, type ExtractManyRelations, type FilterOperators, type FromSchema, NodePostgresProvider, type NodePostgresProviderState, type NullToUndefined, type NullifyIfOptional, PG_CREATED_AT, PG_DEFAULT, PG_IDENTITY, PG_MANY, PG_ONE, PG_PRIMARY_KEY, PG_REF, PG_SCHEMA, PG_SERIAL, PG_UPDATED_AT, PG_VERSION, type Page, type PageQuery, type PgAttrField, type PgDefault, type PgIdentityOptions, type PgMany, type PgManyOptions, type PgPrimaryKey, type PgQuery, type PgQueryWhere, type PgQueryWhereWithMany, type PgQueryWith, type PgQueryWithMap, type PgRef, type PgRefOptions, type PgSymbolKeys, type PgSymbols, type PgTableConfig, type PgTableWithColumnsAndSchema, PostgresModule, PostgresProvider, PostgresTypeProvider, type RemoveManyRelations, Repository, type RepositoryDescriptorOptions, RepositoryDescriptorProvider, type SQLLike, type SequenceDescriptor, type SequenceDescriptorOptions, type StatementOptions, type TEntity, type TInsertObject, type TPage, type TransactionContext, type TransactionDescriptorOptions, entityKeys, entitySchema, nullToUndefined, pageQuerySchema, pageSchema, pg, pgTableSchema, schema, schemaToColumns };
|