alepha 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 -196
- package/core.js +0 -1
- package/datetime.cjs +0 -1
- package/datetime.d.ts +68 -79
- package/datetime.js +0 -1
- package/lock.cjs +0 -1
- package/lock.d.ts +3 -14
- package/lock.js +0 -1
- package/package.json +54 -53
- package/postgres.cjs +0 -1
- package/postgres.d.ts +3250 -288
- 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 +12 -5
- package/react/auth.js +0 -1
- package/react.cjs +0 -1
- package/react.d.ts +317 -206
- package/react.js +0 -1
- package/redis.cjs +0 -1
- package/redis.d.ts +10 -8
- 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 +82 -35
- 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.js +0 -1
- package/server/static.cjs +0 -1
- package/server/static.d.ts +1 -0
- package/server/static.js +0 -1
- package/server/swagger.cjs +0 -1
- package/server/swagger.js +0 -1
- package/server.cjs +0 -1
- package/server.d.ts +402 -327
- package/server.js +0 -1
- package/src/retry.ts +1 -0
- package/topic.cjs +0 -1
- package/topic.d.ts +3 -20
- package/topic.js +0 -1
- package/vite.cjs +0 -1
- package/vite.d.ts +57 -38
- 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 +0 -13
- package/server/proxy.cjs.map +0 -1
- package/server/proxy.d.ts +0 -1
- package/server/proxy.js +0 -2
- 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/src/server/proxy.ts +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,20 +1,26 @@
|
|
|
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,
|
|
5
|
-
import * as
|
|
6
|
-
import
|
|
7
|
-
import { TableConfig, BuildExtraConfigColumns, SQLWrapper, SQL, BuildColumns } from 'drizzle-orm';
|
|
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
|
+
import * as drizzle_orm from 'drizzle-orm';
|
|
6
|
+
import { TableConfig, BuildColumns, BuildExtraConfigColumns as BuildExtraConfigColumns$1, SQLWrapper, SQL } from 'drizzle-orm';
|
|
8
7
|
export { sql } from 'drizzle-orm';
|
|
9
8
|
import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
|
|
10
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';
|
|
11
10
|
export * from 'drizzle-orm/pg-core';
|
|
11
|
+
import { BuildExtraConfigColumns } from 'drizzle-orm/column-builder';
|
|
12
|
+
import * as _alepha_retry from '@alepha/retry';
|
|
12
13
|
import { PgTransactionConfig as PgTransactionConfig$1 } from 'drizzle-orm/pg-core/session';
|
|
13
|
-
import {
|
|
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
|
-
import {
|
|
17
|
-
import
|
|
22
|
+
import { PostgresJsDatabase } from 'drizzle-orm/postgres-js';
|
|
23
|
+
import postgres from 'postgres';
|
|
18
24
|
import { UpdateDeleteAction as UpdateDeleteAction$1 } from 'drizzle-orm/pg-core/foreign-keys';
|
|
19
25
|
|
|
20
26
|
/**
|
|
@@ -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,13 +79,48 @@ interface PgRefOptions {
|
|
|
67
79
|
};
|
|
68
80
|
}
|
|
69
81
|
|
|
82
|
+
/**
|
|
83
|
+
* Fork of the original typebox schema "TObject".
|
|
84
|
+
*
|
|
85
|
+
* Expect some breaking changes in the future...
|
|
86
|
+
*/
|
|
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
|
+
}>;
|
|
117
|
+
|
|
70
118
|
/**
|
|
71
119
|
* Convert a schema to columns.
|
|
72
120
|
*
|
|
73
121
|
* @param schema
|
|
74
122
|
*/
|
|
75
123
|
declare const schemaToColumns: <T extends TObject$1>(schema: T) => FromSchema<T>;
|
|
76
|
-
declare const fromSchema: <T extends TObject$1>(schema: T) => FromSchema<T>;
|
|
77
124
|
/**
|
|
78
125
|
* Convert a schema to columns.
|
|
79
126
|
*/
|
|
@@ -87,16 +134,33 @@ type FromSchema<T extends TObject$1> = {
|
|
|
87
134
|
* A table with columns and schema.
|
|
88
135
|
*/
|
|
89
136
|
type PgTableWithColumnsAndSchema<T extends TableConfig, R extends TObject$1> = PgTableWithColumns<T> & {
|
|
90
|
-
|
|
137
|
+
get $table(): PgTableWithColumns<T>;
|
|
138
|
+
get $schema(): R;
|
|
139
|
+
get $insertSchema(): TInsertObject<R>;
|
|
91
140
|
};
|
|
92
141
|
|
|
93
|
-
|
|
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";
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
interface EntityDescriptorOptions<TTableName extends string, T extends TObject, Keys = keyof Static<T>> {
|
|
94
158
|
/**
|
|
95
159
|
* The name of the table. This is the name that will be used in the database.
|
|
96
160
|
* @example
|
|
97
161
|
* name: "user"
|
|
98
162
|
*/
|
|
99
|
-
name:
|
|
163
|
+
name: TTableName;
|
|
100
164
|
/**
|
|
101
165
|
* The schema of the table. This is a TypeBox schema that describes the columns and their types.
|
|
102
166
|
* @example
|
|
@@ -117,19 +181,29 @@ interface EntityDescriptorOptions<T extends TObject, Keys = keyof Static<T>> {
|
|
|
117
181
|
column: Keys;
|
|
118
182
|
unique?: boolean;
|
|
119
183
|
name?: string;
|
|
184
|
+
} | {
|
|
185
|
+
columns: Keys[];
|
|
186
|
+
unique?: boolean;
|
|
187
|
+
name?: string;
|
|
120
188
|
})[];
|
|
189
|
+
relations?: Record<string, {
|
|
190
|
+
type: "one" | "many";
|
|
191
|
+
table: () => any;
|
|
192
|
+
foreignColumn?: keyof Static<T>;
|
|
193
|
+
}>;
|
|
121
194
|
/**
|
|
122
195
|
* Extra configuration for the table. See drizzle-orm documentation for more details.
|
|
123
196
|
*
|
|
124
197
|
* @param self The table descriptor.
|
|
125
198
|
* @returns The extra configuration for the table.
|
|
126
199
|
*/
|
|
127
|
-
config?: (self: BuildExtraConfigColumns<string, FromSchema<T>, "pg">) => PgTableExtraConfigValue[];
|
|
200
|
+
config?: (self: BuildExtraConfigColumns$1<string, FromSchema<T>, "pg">) => PgTableExtraConfigValue[];
|
|
128
201
|
}
|
|
129
202
|
/**
|
|
130
203
|
* Creates a table descriptor for drizzle-orm.
|
|
131
204
|
*/
|
|
132
|
-
declare const $entity: <
|
|
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>;
|
|
133
207
|
|
|
134
208
|
type SQLLike = SQLWrapper | string;
|
|
135
209
|
declare class PostgresProvider {
|
|
@@ -140,41 +214,9 @@ declare class PostgresProvider {
|
|
|
140
214
|
get db(): PgDatabase<any>;
|
|
141
215
|
get schema(): string;
|
|
142
216
|
get dialect(): string;
|
|
143
|
-
execute(
|
|
217
|
+
execute(_query: SQLLike): Promise<any[]>;
|
|
144
218
|
}
|
|
145
219
|
|
|
146
|
-
/**
|
|
147
|
-
* Fork of the original typebox schema "TObject".
|
|
148
|
-
*
|
|
149
|
-
* Expect some breaking changes in the future...
|
|
150
|
-
*/
|
|
151
|
-
interface TInsertObject<T extends TObject> extends TSchema, ObjectOptions {
|
|
152
|
-
[Kind]: "Object";
|
|
153
|
-
static: ObjectStatic<T["properties"], this["params"]>;
|
|
154
|
-
additionalProperties?: TAdditionalProperties;
|
|
155
|
-
type: "object";
|
|
156
|
-
required?: string[];
|
|
157
|
-
properties: {
|
|
158
|
-
[K in keyof T["properties"] as T["properties"][K] extends {
|
|
159
|
-
[PG_DEFAULT]: any;
|
|
160
|
-
} ? never : K]: T["properties"][K];
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
type ReadonlyOptionalPropertyKeys<T extends TProperties> = {
|
|
164
|
-
[K in keyof T]: T[K] extends TReadonly<TSchema> ? T[K] extends TOptional<T[K]> ? K : never : never;
|
|
165
|
-
}[keyof T];
|
|
166
|
-
type ReadonlyPropertyKeys<T extends TProperties> = {
|
|
167
|
-
[K in keyof T]: T[K] extends TReadonly<TSchema> ? T[K] extends TOptional<T[K]> ? never : K : never;
|
|
168
|
-
}[keyof T];
|
|
169
|
-
type OptionalPropertyKeys<T extends TProperties> = {
|
|
170
|
-
[K in keyof T]: T[K] extends TOptional<TSchema> ? T[K] extends TReadonly<T[K]> ? never : K : never;
|
|
171
|
-
}[keyof T];
|
|
172
|
-
type RequiredPropertyKeys<T extends TProperties> = keyof Omit<T, ReadonlyOptionalPropertyKeys<T> | ReadonlyPropertyKeys<T> | OptionalPropertyKeys<T>>;
|
|
173
|
-
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>>>>;
|
|
174
|
-
type ObjectStatic<T extends TProperties, P extends unknown[]> = ObjectStaticProperties<T, {
|
|
175
|
-
[K in keyof T]: Static<T[K], P>;
|
|
176
|
-
}>;
|
|
177
|
-
|
|
178
220
|
/**
|
|
179
221
|
* Replaces all null values in an object with undefined.
|
|
180
222
|
*
|
|
@@ -727,7 +769,7 @@ declare class Repository<TTable extends PgTableWithColumns<TableConfig$1>, TTabl
|
|
|
727
769
|
protected readonly env: {
|
|
728
770
|
POSTGRES_PAGINATION_COUNT_ENABLED: boolean;
|
|
729
771
|
};
|
|
730
|
-
static of: <TEntity extends TableConfig$1, TSchema extends TObject>(
|
|
772
|
+
static of: <TEntity extends TableConfig$1, TSchema extends TObject>(opts: PgTableWithColumnsAndSchema<TEntity, TSchema>) => (new () => Repository<PgTableWithColumns<TEntity>, TSchema>);
|
|
731
773
|
/**
|
|
732
774
|
* Register Repository as a valid descriptor.
|
|
733
775
|
* - Required for $repository to work.
|
|
@@ -776,7 +818,7 @@ declare class Repository<TTable extends PgTableWithColumns<TableConfig$1>, TTabl
|
|
|
776
818
|
/**
|
|
777
819
|
* Getter for the database connection from the database provider.
|
|
778
820
|
*/
|
|
779
|
-
get db(): PgDatabase<any, Record<string, never>,
|
|
821
|
+
get db(): PgDatabase<any, Record<string, never>, drizzle_orm.ExtractTablesWithRelations<Record<string, never>>>;
|
|
780
822
|
/**
|
|
781
823
|
*
|
|
782
824
|
*/
|
|
@@ -807,10 +849,10 @@ declare class Repository<TTable extends PgTableWithColumns<TableConfig$1>, TTabl
|
|
|
807
849
|
*
|
|
808
850
|
* @returns The SELECT query builder.
|
|
809
851
|
*/
|
|
810
|
-
protected select(opts?: StatementOptions): drizzle_orm_pg_core.PgSelectBase<string, Record<string, PgColumn<
|
|
852
|
+
protected select(opts?: StatementOptions): drizzle_orm_pg_core.PgSelectBase<string, Record<string, PgColumn<drizzle_orm.ColumnBaseConfig<drizzle_orm.ColumnDataType, string>, {}, {}>>, "single", Record<string, "not-null">, false, never, {
|
|
811
853
|
[x: string]: unknown;
|
|
812
854
|
}[], {
|
|
813
|
-
[x: string]: PgColumn<
|
|
855
|
+
[x: string]: PgColumn<drizzle_orm.ColumnBaseConfig<drizzle_orm.ColumnDataType, string>, {}, {}>;
|
|
814
856
|
}>;
|
|
815
857
|
/**
|
|
816
858
|
* Start an INSERT query on the table.
|
|
@@ -1001,7 +1043,7 @@ declare class Repository<TTable extends PgTableWithColumns<TableConfig$1>, TTabl
|
|
|
1001
1043
|
*/
|
|
1002
1044
|
protected getPrimaryKey(schema: TObject): {
|
|
1003
1045
|
key: string;
|
|
1004
|
-
col: PgColumn<
|
|
1046
|
+
col: PgColumn<drizzle_orm.ColumnBaseConfig<drizzle_orm.ColumnDataType, string>, {}, {}>;
|
|
1005
1047
|
type: TSchema;
|
|
1006
1048
|
};
|
|
1007
1049
|
/**
|
|
@@ -1144,7 +1186,7 @@ type TransactionContext = PgTransaction<any, any, any>;
|
|
|
1144
1186
|
/**
|
|
1145
1187
|
* Creates a transaction descriptor.
|
|
1146
1188
|
*/
|
|
1147
|
-
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>>;
|
|
1148
1190
|
|
|
1149
1191
|
declare class EntityNotFoundError extends Error {
|
|
1150
1192
|
readonly code = "ERR_RESOURCE_NOTFOUND";
|
|
@@ -1152,26 +1194,3096 @@ declare class EntityNotFoundError extends Error {
|
|
|
1152
1194
|
constructor(entityName: string);
|
|
1153
1195
|
}
|
|
1154
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;
|
|
1155
1218
|
/**
|
|
1156
|
-
*
|
|
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**
|
|
1157
1221
|
*
|
|
1158
|
-
*
|
|
1159
|
-
*
|
|
1160
|
-
*
|
|
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
|
|
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
|
|
1161
1307
|
*/
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
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
|
+
type: string;
|
|
1449
|
+
name: string;
|
|
1450
|
+
primaryKey: boolean;
|
|
1451
|
+
notNull: boolean;
|
|
1452
|
+
default?: any;
|
|
1453
|
+
generated?: {
|
|
1454
|
+
type: "stored" | "virtual";
|
|
1455
|
+
as: string;
|
|
1456
|
+
} | undefined;
|
|
1457
|
+
onUpdate?: any;
|
|
1458
|
+
autoincrement?: boolean | undefined;
|
|
1459
|
+
}, {
|
|
1460
|
+
type: string;
|
|
1461
|
+
name: string;
|
|
1462
|
+
primaryKey: boolean;
|
|
1463
|
+
notNull: boolean;
|
|
1464
|
+
default?: any;
|
|
1465
|
+
generated?: {
|
|
1466
|
+
type: "stored" | "virtual";
|
|
1467
|
+
as: string;
|
|
1468
|
+
} | undefined;
|
|
1469
|
+
onUpdate?: any;
|
|
1470
|
+
autoincrement?: boolean | 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?: "default" | "none" | "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?: "default" | "none" | "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
|
+
value: string;
|
|
1544
|
+
name: string;
|
|
1545
|
+
}, {
|
|
1546
|
+
value: string;
|
|
1547
|
+
name: string;
|
|
1548
|
+
}>>>;
|
|
1549
|
+
}, "strict", zod.ZodTypeAny, {
|
|
1550
|
+
name: string;
|
|
1551
|
+
columns: Record<string, {
|
|
1552
|
+
type: string;
|
|
1553
|
+
name: string;
|
|
1554
|
+
primaryKey: boolean;
|
|
1555
|
+
notNull: boolean;
|
|
1556
|
+
default?: any;
|
|
1557
|
+
generated?: {
|
|
1558
|
+
type: "stored" | "virtual";
|
|
1559
|
+
as: string;
|
|
1560
|
+
} | undefined;
|
|
1561
|
+
onUpdate?: any;
|
|
1562
|
+
autoincrement?: boolean | 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?: "default" | "none" | "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
|
+
value: string;
|
|
1591
|
+
name: string;
|
|
1592
|
+
}>;
|
|
1593
|
+
}, {
|
|
1594
|
+
name: string;
|
|
1595
|
+
columns: Record<string, {
|
|
1596
|
+
type: string;
|
|
1597
|
+
name: string;
|
|
1598
|
+
primaryKey: boolean;
|
|
1599
|
+
notNull: boolean;
|
|
1600
|
+
default?: any;
|
|
1601
|
+
generated?: {
|
|
1602
|
+
type: "stored" | "virtual";
|
|
1603
|
+
as: string;
|
|
1604
|
+
} | undefined;
|
|
1605
|
+
onUpdate?: any;
|
|
1606
|
+
autoincrement?: boolean | 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?: "default" | "none" | "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
|
+
value: string;
|
|
1635
|
+
name: 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
|
+
type: string;
|
|
1660
|
+
name: string;
|
|
1661
|
+
primaryKey: boolean;
|
|
1662
|
+
notNull: boolean;
|
|
1663
|
+
default?: any;
|
|
1664
|
+
generated?: {
|
|
1665
|
+
type: "stored" | "virtual";
|
|
1666
|
+
as: string;
|
|
1667
|
+
} | undefined;
|
|
1668
|
+
onUpdate?: any;
|
|
1669
|
+
autoincrement?: boolean | undefined;
|
|
1670
|
+
}, {
|
|
1671
|
+
type: string;
|
|
1672
|
+
name: string;
|
|
1673
|
+
primaryKey: boolean;
|
|
1674
|
+
notNull: boolean;
|
|
1675
|
+
default?: any;
|
|
1676
|
+
generated?: {
|
|
1677
|
+
type: "stored" | "virtual";
|
|
1678
|
+
as: string;
|
|
1679
|
+
} | undefined;
|
|
1680
|
+
onUpdate?: any;
|
|
1681
|
+
autoincrement?: boolean | 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
|
+
type: string;
|
|
1693
|
+
name: string;
|
|
1694
|
+
primaryKey: boolean;
|
|
1695
|
+
notNull: boolean;
|
|
1696
|
+
default?: any;
|
|
1697
|
+
generated?: {
|
|
1698
|
+
type: "stored" | "virtual";
|
|
1699
|
+
as: string;
|
|
1700
|
+
} | undefined;
|
|
1701
|
+
onUpdate?: any;
|
|
1702
|
+
autoincrement?: boolean | undefined;
|
|
1703
|
+
}>;
|
|
1704
|
+
isExisting: boolean;
|
|
1705
|
+
algorithm: "undefined" | "merge" | "temptable";
|
|
1706
|
+
sqlSecurity: "definer" | "invoker";
|
|
1707
|
+
definition?: string | undefined;
|
|
1708
|
+
withCheckOption?: "local" | "cascaded" | undefined;
|
|
1709
|
+
}, {
|
|
1710
|
+
name: string;
|
|
1711
|
+
columns: Record<string, {
|
|
1712
|
+
type: string;
|
|
1713
|
+
name: string;
|
|
1714
|
+
primaryKey: boolean;
|
|
1715
|
+
notNull: boolean;
|
|
1716
|
+
default?: any;
|
|
1717
|
+
generated?: {
|
|
1718
|
+
type: "stored" | "virtual";
|
|
1719
|
+
as: string;
|
|
1720
|
+
} | undefined;
|
|
1721
|
+
onUpdate?: any;
|
|
1722
|
+
autoincrement?: boolean | undefined;
|
|
1723
|
+
}>;
|
|
1724
|
+
isExisting: boolean;
|
|
1725
|
+
algorithm: "undefined" | "merge" | "temptable";
|
|
1726
|
+
sqlSecurity: "definer" | "invoker";
|
|
1727
|
+
definition?: string | undefined;
|
|
1728
|
+
withCheckOption?: "local" | "cascaded" | 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
|
+
tables: Record<string, string>;
|
|
1735
|
+
columns: Record<string, string>;
|
|
1736
|
+
}, {
|
|
1737
|
+
tables: Record<string, string>;
|
|
1738
|
+
columns: 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
|
+
tables?: Record<string, {
|
|
1777
|
+
columns: Record<string, {
|
|
1778
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
1779
|
+
} | undefined>;
|
|
1780
|
+
} | undefined> | undefined;
|
|
1781
|
+
indexes?: Record<string, {
|
|
1782
|
+
columns: Record<string, {
|
|
1783
|
+
isExpression?: boolean | undefined;
|
|
1784
|
+
} | undefined>;
|
|
1785
|
+
} | undefined> | undefined;
|
|
1786
|
+
}, {
|
|
1787
|
+
tables?: Record<string, {
|
|
1788
|
+
columns: Record<string, {
|
|
1789
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
1790
|
+
} | undefined>;
|
|
1791
|
+
} | undefined> | undefined;
|
|
1792
|
+
indexes?: Record<string, {
|
|
1793
|
+
columns: Record<string, {
|
|
1794
|
+
isExpression?: boolean | undefined;
|
|
1795
|
+
} | undefined>;
|
|
1796
|
+
} | undefined> | undefined;
|
|
1797
|
+
}>>;
|
|
1798
|
+
} & {
|
|
1799
|
+
id: zod.ZodString;
|
|
1800
|
+
prevId: zod.ZodString;
|
|
1801
|
+
}, "strip", zod.ZodTypeAny, {
|
|
1802
|
+
version: "5";
|
|
1803
|
+
dialect: "mysql";
|
|
1804
|
+
tables: Record<string, {
|
|
1805
|
+
name: string;
|
|
1806
|
+
columns: Record<string, {
|
|
1807
|
+
type: string;
|
|
1808
|
+
name: string;
|
|
1809
|
+
primaryKey: boolean;
|
|
1810
|
+
notNull: boolean;
|
|
1811
|
+
default?: any;
|
|
1812
|
+
generated?: {
|
|
1813
|
+
type: "stored" | "virtual";
|
|
1814
|
+
as: string;
|
|
1815
|
+
} | undefined;
|
|
1816
|
+
onUpdate?: any;
|
|
1817
|
+
autoincrement?: boolean | undefined;
|
|
1818
|
+
}>;
|
|
1819
|
+
indexes: Record<string, {
|
|
1820
|
+
name: string;
|
|
1821
|
+
columns: string[];
|
|
1822
|
+
isUnique: boolean;
|
|
1823
|
+
using?: "btree" | "hash" | undefined;
|
|
1824
|
+
algorithm?: "default" | "inplace" | "copy" | undefined;
|
|
1825
|
+
lock?: "default" | "none" | "shared" | "exclusive" | undefined;
|
|
1826
|
+
}>;
|
|
1827
|
+
foreignKeys: Record<string, {
|
|
1828
|
+
name: string;
|
|
1829
|
+
tableFrom: string;
|
|
1830
|
+
columnsFrom: string[];
|
|
1831
|
+
tableTo: string;
|
|
1832
|
+
columnsTo: string[];
|
|
1833
|
+
onUpdate?: string | undefined;
|
|
1834
|
+
onDelete?: string | undefined;
|
|
1835
|
+
}>;
|
|
1836
|
+
compositePrimaryKeys: Record<string, {
|
|
1837
|
+
name: string;
|
|
1838
|
+
columns: string[];
|
|
1839
|
+
}>;
|
|
1840
|
+
uniqueConstraints: Record<string, {
|
|
1841
|
+
name: string;
|
|
1842
|
+
columns: string[];
|
|
1843
|
+
}>;
|
|
1844
|
+
checkConstraint: Record<string, {
|
|
1845
|
+
value: string;
|
|
1846
|
+
name: string;
|
|
1847
|
+
}>;
|
|
1848
|
+
}>;
|
|
1849
|
+
views: Record<string, {
|
|
1850
|
+
name: string;
|
|
1851
|
+
columns: Record<string, {
|
|
1852
|
+
type: string;
|
|
1853
|
+
name: string;
|
|
1854
|
+
primaryKey: boolean;
|
|
1855
|
+
notNull: boolean;
|
|
1856
|
+
default?: any;
|
|
1857
|
+
generated?: {
|
|
1858
|
+
type: "stored" | "virtual";
|
|
1859
|
+
as: string;
|
|
1860
|
+
} | undefined;
|
|
1861
|
+
onUpdate?: any;
|
|
1862
|
+
autoincrement?: boolean | undefined;
|
|
1863
|
+
}>;
|
|
1864
|
+
isExisting: boolean;
|
|
1865
|
+
algorithm: "undefined" | "merge" | "temptable";
|
|
1866
|
+
sqlSecurity: "definer" | "invoker";
|
|
1867
|
+
definition?: string | undefined;
|
|
1868
|
+
withCheckOption?: "local" | "cascaded" | undefined;
|
|
1869
|
+
}>;
|
|
1870
|
+
_meta: {
|
|
1871
|
+
tables: Record<string, string>;
|
|
1872
|
+
columns: Record<string, string>;
|
|
1873
|
+
};
|
|
1874
|
+
id: string;
|
|
1875
|
+
prevId: string;
|
|
1876
|
+
internal?: {
|
|
1877
|
+
tables?: Record<string, {
|
|
1878
|
+
columns: Record<string, {
|
|
1879
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
1880
|
+
} | undefined>;
|
|
1881
|
+
} | undefined> | undefined;
|
|
1882
|
+
indexes?: Record<string, {
|
|
1883
|
+
columns: Record<string, {
|
|
1884
|
+
isExpression?: boolean | undefined;
|
|
1885
|
+
} | undefined>;
|
|
1886
|
+
} | undefined> | undefined;
|
|
1887
|
+
} | undefined;
|
|
1888
|
+
}, {
|
|
1889
|
+
version: "5";
|
|
1890
|
+
dialect: "mysql";
|
|
1891
|
+
tables: Record<string, {
|
|
1892
|
+
name: string;
|
|
1893
|
+
columns: Record<string, {
|
|
1894
|
+
type: string;
|
|
1895
|
+
name: string;
|
|
1896
|
+
primaryKey: boolean;
|
|
1897
|
+
notNull: boolean;
|
|
1898
|
+
default?: any;
|
|
1899
|
+
generated?: {
|
|
1900
|
+
type: "stored" | "virtual";
|
|
1901
|
+
as: string;
|
|
1902
|
+
} | undefined;
|
|
1903
|
+
onUpdate?: any;
|
|
1904
|
+
autoincrement?: boolean | undefined;
|
|
1905
|
+
}>;
|
|
1906
|
+
indexes: Record<string, {
|
|
1907
|
+
name: string;
|
|
1908
|
+
columns: string[];
|
|
1909
|
+
isUnique: boolean;
|
|
1910
|
+
using?: "btree" | "hash" | undefined;
|
|
1911
|
+
algorithm?: "default" | "inplace" | "copy" | undefined;
|
|
1912
|
+
lock?: "default" | "none" | "shared" | "exclusive" | undefined;
|
|
1913
|
+
}>;
|
|
1914
|
+
foreignKeys: Record<string, {
|
|
1915
|
+
name: string;
|
|
1916
|
+
tableFrom: string;
|
|
1917
|
+
columnsFrom: string[];
|
|
1918
|
+
tableTo: string;
|
|
1919
|
+
columnsTo: string[];
|
|
1920
|
+
onUpdate?: string | undefined;
|
|
1921
|
+
onDelete?: string | undefined;
|
|
1922
|
+
}>;
|
|
1923
|
+
compositePrimaryKeys: Record<string, {
|
|
1924
|
+
name: string;
|
|
1925
|
+
columns: string[];
|
|
1926
|
+
}>;
|
|
1927
|
+
uniqueConstraints?: Record<string, {
|
|
1928
|
+
name: string;
|
|
1929
|
+
columns: string[];
|
|
1930
|
+
}> | undefined;
|
|
1931
|
+
checkConstraint?: Record<string, {
|
|
1932
|
+
value: string;
|
|
1933
|
+
name: string;
|
|
1934
|
+
}> | undefined;
|
|
1935
|
+
}>;
|
|
1936
|
+
_meta: {
|
|
1937
|
+
tables: Record<string, string>;
|
|
1938
|
+
columns: Record<string, string>;
|
|
1939
|
+
};
|
|
1940
|
+
id: string;
|
|
1941
|
+
prevId: string;
|
|
1942
|
+
views?: Record<string, {
|
|
1943
|
+
name: string;
|
|
1944
|
+
columns: Record<string, {
|
|
1945
|
+
type: string;
|
|
1946
|
+
name: string;
|
|
1947
|
+
primaryKey: boolean;
|
|
1948
|
+
notNull: boolean;
|
|
1949
|
+
default?: any;
|
|
1950
|
+
generated?: {
|
|
1951
|
+
type: "stored" | "virtual";
|
|
1952
|
+
as: string;
|
|
1953
|
+
} | undefined;
|
|
1954
|
+
onUpdate?: any;
|
|
1955
|
+
autoincrement?: boolean | undefined;
|
|
1956
|
+
}>;
|
|
1957
|
+
isExisting: boolean;
|
|
1958
|
+
algorithm: "undefined" | "merge" | "temptable";
|
|
1959
|
+
sqlSecurity: "definer" | "invoker";
|
|
1960
|
+
definition?: string | undefined;
|
|
1961
|
+
withCheckOption?: "local" | "cascaded" | undefined;
|
|
1962
|
+
}> | undefined;
|
|
1963
|
+
internal?: {
|
|
1964
|
+
tables?: Record<string, {
|
|
1965
|
+
columns: Record<string, {
|
|
1966
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
1967
|
+
} | undefined>;
|
|
1968
|
+
} | undefined> | undefined;
|
|
1969
|
+
indexes?: Record<string, {
|
|
1970
|
+
columns: Record<string, {
|
|
1971
|
+
isExpression?: boolean | undefined;
|
|
1972
|
+
} | undefined>;
|
|
1973
|
+
} | undefined> | 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
|
+
type: "always" | "byDefault";
|
|
2017
|
+
name: string;
|
|
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
|
+
type: "always" | "byDefault";
|
|
2027
|
+
name: string;
|
|
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
|
+
type: string;
|
|
2038
|
+
name: string;
|
|
2039
|
+
primaryKey: boolean;
|
|
2040
|
+
notNull: boolean;
|
|
2041
|
+
typeSchema?: string | undefined;
|
|
2042
|
+
default?: any;
|
|
2043
|
+
isUnique?: any;
|
|
2044
|
+
uniqueName?: string | undefined;
|
|
2045
|
+
nullsNotDistinct?: boolean | undefined;
|
|
2046
|
+
generated?: {
|
|
2047
|
+
type: "stored";
|
|
2048
|
+
as: string;
|
|
2049
|
+
} | undefined;
|
|
2050
|
+
identity?: {
|
|
2051
|
+
type: "always" | "byDefault";
|
|
2052
|
+
name: string;
|
|
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
|
+
type: string;
|
|
2063
|
+
name: string;
|
|
2064
|
+
primaryKey: boolean;
|
|
2065
|
+
notNull: boolean;
|
|
2066
|
+
typeSchema?: string | undefined;
|
|
2067
|
+
default?: any;
|
|
2068
|
+
isUnique?: any;
|
|
2069
|
+
uniqueName?: string | undefined;
|
|
2070
|
+
nullsNotDistinct?: boolean | undefined;
|
|
2071
|
+
generated?: {
|
|
2072
|
+
type: "stored";
|
|
2073
|
+
as: string;
|
|
2074
|
+
} | undefined;
|
|
2075
|
+
identity?: {
|
|
2076
|
+
type: "always" | "byDefault";
|
|
2077
|
+
name: string;
|
|
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
|
+
expression: string;
|
|
2097
|
+
isExpression: boolean;
|
|
2098
|
+
asc: boolean;
|
|
2099
|
+
nulls?: string | undefined;
|
|
2100
|
+
opclass?: string | undefined;
|
|
2101
|
+
}, {
|
|
2102
|
+
expression: string;
|
|
2103
|
+
isExpression: boolean;
|
|
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
|
+
expression: string;
|
|
2117
|
+
isExpression: boolean;
|
|
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
|
+
expression: string;
|
|
2131
|
+
isExpression: boolean;
|
|
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
|
+
schemaTo?: string | undefined;
|
|
2158
|
+
onUpdate?: string | undefined;
|
|
2159
|
+
onDelete?: string | undefined;
|
|
2160
|
+
}, {
|
|
2161
|
+
name: string;
|
|
2162
|
+
tableFrom: string;
|
|
2163
|
+
columnsFrom: string[];
|
|
2164
|
+
tableTo: string;
|
|
2165
|
+
columnsTo: string[];
|
|
2166
|
+
schemaTo?: string | undefined;
|
|
2167
|
+
onUpdate?: string | undefined;
|
|
2168
|
+
onDelete?: 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
|
+
schema?: string | undefined;
|
|
2205
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
2206
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
2207
|
+
to?: string[] | undefined;
|
|
2208
|
+
using?: string | undefined;
|
|
2209
|
+
withCheck?: string | undefined;
|
|
2210
|
+
on?: string | undefined;
|
|
2211
|
+
}, {
|
|
2212
|
+
name: string;
|
|
2213
|
+
schema?: string | undefined;
|
|
2214
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
2215
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
2216
|
+
to?: string[] | undefined;
|
|
2217
|
+
using?: 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
|
+
value: string;
|
|
2226
|
+
name: string;
|
|
2227
|
+
}, {
|
|
2228
|
+
value: string;
|
|
2229
|
+
name: string;
|
|
2230
|
+
}>>>;
|
|
2231
|
+
isRLSEnabled: zod.ZodDefault<zod.ZodBoolean>;
|
|
2232
|
+
}, "strict", zod.ZodTypeAny, {
|
|
2233
|
+
name: string;
|
|
2234
|
+
schema: string;
|
|
2235
|
+
columns: Record<string, {
|
|
2236
|
+
type: string;
|
|
2237
|
+
name: string;
|
|
2238
|
+
primaryKey: boolean;
|
|
2239
|
+
notNull: boolean;
|
|
2240
|
+
typeSchema?: string | undefined;
|
|
2241
|
+
default?: any;
|
|
2242
|
+
isUnique?: any;
|
|
2243
|
+
uniqueName?: string | undefined;
|
|
2244
|
+
nullsNotDistinct?: boolean | undefined;
|
|
2245
|
+
generated?: {
|
|
2246
|
+
type: "stored";
|
|
2247
|
+
as: string;
|
|
2248
|
+
} | undefined;
|
|
2249
|
+
identity?: {
|
|
2250
|
+
type: "always" | "byDefault";
|
|
2251
|
+
name: string;
|
|
2252
|
+
schema: string;
|
|
2253
|
+
increment?: string | undefined;
|
|
2254
|
+
minValue?: string | undefined;
|
|
2255
|
+
maxValue?: string | undefined;
|
|
2256
|
+
startWith?: string | undefined;
|
|
2257
|
+
cache?: string | undefined;
|
|
2258
|
+
cycle?: boolean | undefined;
|
|
2259
|
+
} | undefined;
|
|
2260
|
+
}>;
|
|
2261
|
+
indexes: Record<string, {
|
|
2262
|
+
name: string;
|
|
2263
|
+
columns: {
|
|
2264
|
+
expression: string;
|
|
2265
|
+
isExpression: boolean;
|
|
2266
|
+
asc: boolean;
|
|
2267
|
+
nulls?: string | undefined;
|
|
2268
|
+
opclass?: string | undefined;
|
|
2269
|
+
}[];
|
|
2270
|
+
isUnique: boolean;
|
|
2271
|
+
method: string;
|
|
2272
|
+
concurrently: boolean;
|
|
2273
|
+
with?: Record<string, any> | undefined;
|
|
2274
|
+
where?: string | undefined;
|
|
2275
|
+
}>;
|
|
2276
|
+
foreignKeys: Record<string, {
|
|
2277
|
+
name: string;
|
|
2278
|
+
tableFrom: string;
|
|
2279
|
+
columnsFrom: string[];
|
|
2280
|
+
tableTo: string;
|
|
2281
|
+
columnsTo: string[];
|
|
2282
|
+
schemaTo?: string | undefined;
|
|
2283
|
+
onUpdate?: string | undefined;
|
|
2284
|
+
onDelete?: string | undefined;
|
|
2285
|
+
}>;
|
|
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
|
+
policies: Record<string, {
|
|
2296
|
+
name: string;
|
|
2297
|
+
schema?: string | undefined;
|
|
2298
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
2299
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
2300
|
+
to?: string[] | undefined;
|
|
2301
|
+
using?: string | undefined;
|
|
2302
|
+
withCheck?: string | undefined;
|
|
2303
|
+
on?: string | undefined;
|
|
2304
|
+
}>;
|
|
2305
|
+
checkConstraints: Record<string, {
|
|
2306
|
+
value: string;
|
|
2307
|
+
name: string;
|
|
2308
|
+
}>;
|
|
2309
|
+
isRLSEnabled: boolean;
|
|
2310
|
+
}, {
|
|
2311
|
+
name: string;
|
|
2312
|
+
schema: string;
|
|
2313
|
+
columns: Record<string, {
|
|
2314
|
+
type: string;
|
|
2315
|
+
name: string;
|
|
2316
|
+
primaryKey: boolean;
|
|
2317
|
+
notNull: boolean;
|
|
2318
|
+
typeSchema?: string | undefined;
|
|
2319
|
+
default?: any;
|
|
2320
|
+
isUnique?: any;
|
|
2321
|
+
uniqueName?: string | undefined;
|
|
2322
|
+
nullsNotDistinct?: boolean | undefined;
|
|
2323
|
+
generated?: {
|
|
2324
|
+
type: "stored";
|
|
2325
|
+
as: string;
|
|
2326
|
+
} | undefined;
|
|
2327
|
+
identity?: {
|
|
2328
|
+
type: "always" | "byDefault";
|
|
2329
|
+
name: string;
|
|
2330
|
+
schema: string;
|
|
2331
|
+
increment?: string | undefined;
|
|
2332
|
+
minValue?: string | undefined;
|
|
2333
|
+
maxValue?: string | undefined;
|
|
2334
|
+
startWith?: string | undefined;
|
|
2335
|
+
cache?: string | undefined;
|
|
2336
|
+
cycle?: boolean | undefined;
|
|
2337
|
+
} | undefined;
|
|
2338
|
+
}>;
|
|
2339
|
+
indexes: Record<string, {
|
|
2340
|
+
name: string;
|
|
2341
|
+
columns: {
|
|
2342
|
+
expression: string;
|
|
2343
|
+
isExpression: boolean;
|
|
2344
|
+
asc: boolean;
|
|
2345
|
+
nulls?: string | undefined;
|
|
2346
|
+
opclass?: string | undefined;
|
|
2347
|
+
}[];
|
|
2348
|
+
isUnique: boolean;
|
|
2349
|
+
with?: Record<string, any> | undefined;
|
|
2350
|
+
method?: string | undefined;
|
|
2351
|
+
where?: string | undefined;
|
|
2352
|
+
concurrently?: boolean | undefined;
|
|
2353
|
+
}>;
|
|
2354
|
+
foreignKeys: Record<string, {
|
|
2355
|
+
name: string;
|
|
2356
|
+
tableFrom: string;
|
|
2357
|
+
columnsFrom: string[];
|
|
2358
|
+
tableTo: string;
|
|
2359
|
+
columnsTo: string[];
|
|
2360
|
+
schemaTo?: string | undefined;
|
|
2361
|
+
onUpdate?: string | undefined;
|
|
2362
|
+
onDelete?: string | undefined;
|
|
2363
|
+
}>;
|
|
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
|
+
policies?: Record<string, {
|
|
2374
|
+
name: string;
|
|
2375
|
+
schema?: string | undefined;
|
|
2376
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
2377
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
2378
|
+
to?: string[] | undefined;
|
|
2379
|
+
using?: string | undefined;
|
|
2380
|
+
withCheck?: string | undefined;
|
|
2381
|
+
on?: string | undefined;
|
|
2382
|
+
}> | undefined;
|
|
2383
|
+
checkConstraints?: Record<string, {
|
|
2384
|
+
value: string;
|
|
2385
|
+
name: string;
|
|
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
|
+
values: string[];
|
|
2395
|
+
name: string;
|
|
2396
|
+
schema: string;
|
|
2397
|
+
}, {
|
|
2398
|
+
values: string[];
|
|
2399
|
+
name: 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
|
+
type: "always" | "byDefault";
|
|
2439
|
+
name: string;
|
|
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
|
+
type: "always" | "byDefault";
|
|
2449
|
+
name: string;
|
|
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
|
+
type: string;
|
|
2460
|
+
name: string;
|
|
2461
|
+
primaryKey: boolean;
|
|
2462
|
+
notNull: boolean;
|
|
2463
|
+
typeSchema?: string | undefined;
|
|
2464
|
+
default?: any;
|
|
2465
|
+
isUnique?: any;
|
|
2466
|
+
uniqueName?: string | undefined;
|
|
2467
|
+
nullsNotDistinct?: boolean | undefined;
|
|
2468
|
+
generated?: {
|
|
2469
|
+
type: "stored";
|
|
2470
|
+
as: string;
|
|
2471
|
+
} | undefined;
|
|
2472
|
+
identity?: {
|
|
2473
|
+
type: "always" | "byDefault";
|
|
2474
|
+
name: string;
|
|
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
|
+
type: string;
|
|
2485
|
+
name: string;
|
|
2486
|
+
primaryKey: boolean;
|
|
2487
|
+
notNull: boolean;
|
|
2488
|
+
typeSchema?: string | undefined;
|
|
2489
|
+
default?: any;
|
|
2490
|
+
isUnique?: any;
|
|
2491
|
+
uniqueName?: string | undefined;
|
|
2492
|
+
nullsNotDistinct?: boolean | undefined;
|
|
2493
|
+
generated?: {
|
|
2494
|
+
type: "stored";
|
|
2495
|
+
as: string;
|
|
2496
|
+
} | undefined;
|
|
2497
|
+
identity?: {
|
|
2498
|
+
type: "always" | "byDefault";
|
|
2499
|
+
name: string;
|
|
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
|
+
schema: string;
|
|
2586
|
+
columns: Record<string, {
|
|
2587
|
+
type: string;
|
|
2588
|
+
name: string;
|
|
2589
|
+
primaryKey: boolean;
|
|
2590
|
+
notNull: boolean;
|
|
2591
|
+
typeSchema?: string | undefined;
|
|
2592
|
+
default?: any;
|
|
2593
|
+
isUnique?: any;
|
|
2594
|
+
uniqueName?: string | undefined;
|
|
2595
|
+
nullsNotDistinct?: boolean | undefined;
|
|
2596
|
+
generated?: {
|
|
2597
|
+
type: "stored";
|
|
2598
|
+
as: string;
|
|
2599
|
+
} | undefined;
|
|
2600
|
+
identity?: {
|
|
2601
|
+
type: "always" | "byDefault";
|
|
2602
|
+
name: string;
|
|
2603
|
+
schema: string;
|
|
2604
|
+
increment?: string | undefined;
|
|
2605
|
+
minValue?: string | undefined;
|
|
2606
|
+
maxValue?: string | undefined;
|
|
2607
|
+
startWith?: string | undefined;
|
|
2608
|
+
cache?: string | undefined;
|
|
2609
|
+
cycle?: boolean | undefined;
|
|
2610
|
+
} | undefined;
|
|
2611
|
+
}>;
|
|
2612
|
+
materialized: boolean;
|
|
2613
|
+
isExisting: boolean;
|
|
2614
|
+
with?: {
|
|
2615
|
+
checkOption?: "local" | "cascaded" | undefined;
|
|
2616
|
+
securityBarrier?: boolean | undefined;
|
|
2617
|
+
securityInvoker?: boolean | undefined;
|
|
2618
|
+
fillfactor?: number | undefined;
|
|
2619
|
+
toastTupleTarget?: number | undefined;
|
|
2620
|
+
parallelWorkers?: number | undefined;
|
|
2621
|
+
autovacuumEnabled?: boolean | undefined;
|
|
2622
|
+
vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
|
|
2623
|
+
vacuumTruncate?: boolean | undefined;
|
|
2624
|
+
autovacuumVacuumThreshold?: number | undefined;
|
|
2625
|
+
autovacuumVacuumScaleFactor?: number | undefined;
|
|
2626
|
+
autovacuumVacuumCostDelay?: number | undefined;
|
|
2627
|
+
autovacuumVacuumCostLimit?: number | undefined;
|
|
2628
|
+
autovacuumFreezeMinAge?: number | undefined;
|
|
2629
|
+
autovacuumFreezeMaxAge?: number | undefined;
|
|
2630
|
+
autovacuumFreezeTableAge?: number | undefined;
|
|
2631
|
+
autovacuumMultixactFreezeMinAge?: number | undefined;
|
|
2632
|
+
autovacuumMultixactFreezeMaxAge?: number | undefined;
|
|
2633
|
+
autovacuumMultixactFreezeTableAge?: number | undefined;
|
|
2634
|
+
logAutovacuumMinDuration?: number | undefined;
|
|
2635
|
+
userCatalogTable?: boolean | undefined;
|
|
2636
|
+
} | undefined;
|
|
2637
|
+
using?: string | undefined;
|
|
2638
|
+
definition?: string | undefined;
|
|
2639
|
+
withNoData?: boolean | undefined;
|
|
2640
|
+
tablespace?: string | undefined;
|
|
2641
|
+
}, {
|
|
2642
|
+
name: string;
|
|
2643
|
+
schema: string;
|
|
2644
|
+
columns: Record<string, {
|
|
2645
|
+
type: string;
|
|
2646
|
+
name: string;
|
|
2647
|
+
primaryKey: boolean;
|
|
2648
|
+
notNull: boolean;
|
|
2649
|
+
typeSchema?: string | undefined;
|
|
2650
|
+
default?: any;
|
|
2651
|
+
isUnique?: any;
|
|
2652
|
+
uniqueName?: string | undefined;
|
|
2653
|
+
nullsNotDistinct?: boolean | undefined;
|
|
2654
|
+
generated?: {
|
|
2655
|
+
type: "stored";
|
|
2656
|
+
as: string;
|
|
2657
|
+
} | undefined;
|
|
2658
|
+
identity?: {
|
|
2659
|
+
type: "always" | "byDefault";
|
|
2660
|
+
name: string;
|
|
2661
|
+
schema: string;
|
|
2662
|
+
increment?: string | undefined;
|
|
2663
|
+
minValue?: string | undefined;
|
|
2664
|
+
maxValue?: string | undefined;
|
|
2665
|
+
startWith?: string | undefined;
|
|
2666
|
+
cache?: string | undefined;
|
|
2667
|
+
cycle?: boolean | undefined;
|
|
2668
|
+
} | undefined;
|
|
2669
|
+
}>;
|
|
2670
|
+
materialized: boolean;
|
|
2671
|
+
isExisting: boolean;
|
|
2672
|
+
with?: {
|
|
2673
|
+
checkOption?: "local" | "cascaded" | undefined;
|
|
2674
|
+
securityBarrier?: boolean | undefined;
|
|
2675
|
+
securityInvoker?: boolean | undefined;
|
|
2676
|
+
fillfactor?: number | undefined;
|
|
2677
|
+
toastTupleTarget?: number | undefined;
|
|
2678
|
+
parallelWorkers?: number | undefined;
|
|
2679
|
+
autovacuumEnabled?: boolean | undefined;
|
|
2680
|
+
vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
|
|
2681
|
+
vacuumTruncate?: boolean | undefined;
|
|
2682
|
+
autovacuumVacuumThreshold?: number | undefined;
|
|
2683
|
+
autovacuumVacuumScaleFactor?: number | undefined;
|
|
2684
|
+
autovacuumVacuumCostDelay?: number | undefined;
|
|
2685
|
+
autovacuumVacuumCostLimit?: number | undefined;
|
|
2686
|
+
autovacuumFreezeMinAge?: number | undefined;
|
|
2687
|
+
autovacuumFreezeMaxAge?: number | undefined;
|
|
2688
|
+
autovacuumFreezeTableAge?: number | undefined;
|
|
2689
|
+
autovacuumMultixactFreezeMinAge?: number | undefined;
|
|
2690
|
+
autovacuumMultixactFreezeMaxAge?: number | undefined;
|
|
2691
|
+
autovacuumMultixactFreezeTableAge?: number | undefined;
|
|
2692
|
+
logAutovacuumMinDuration?: number | undefined;
|
|
2693
|
+
userCatalogTable?: boolean | undefined;
|
|
2694
|
+
} | undefined;
|
|
2695
|
+
using?: string | undefined;
|
|
2696
|
+
definition?: string | 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
|
+
schema?: string | undefined;
|
|
2756
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
2757
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
2758
|
+
to?: string[] | undefined;
|
|
2759
|
+
using?: string | undefined;
|
|
2760
|
+
withCheck?: string | undefined;
|
|
2761
|
+
on?: string | undefined;
|
|
2762
|
+
}, {
|
|
2763
|
+
name: string;
|
|
2764
|
+
schema?: string | undefined;
|
|
2765
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
2766
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
2767
|
+
to?: string[] | undefined;
|
|
2768
|
+
using?: 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
|
+
tables: Record<string, string>;
|
|
2778
|
+
columns: Record<string, string>;
|
|
2779
|
+
schemas: Record<string, string>;
|
|
2780
|
+
}, {
|
|
2781
|
+
tables: Record<string, string>;
|
|
2782
|
+
columns: 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
|
+
isArray?: boolean | undefined;
|
|
2794
|
+
dimensions?: number | undefined;
|
|
2795
|
+
rawType?: string | undefined;
|
|
2796
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
2797
|
+
}, {
|
|
2798
|
+
isArray?: boolean | undefined;
|
|
2799
|
+
dimensions?: number | undefined;
|
|
2800
|
+
rawType?: string | undefined;
|
|
2801
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
2802
|
+
}>>>;
|
|
2803
|
+
}, "strip", zod.ZodTypeAny, {
|
|
2804
|
+
columns: Record<string, {
|
|
2805
|
+
isArray?: boolean | undefined;
|
|
2806
|
+
dimensions?: number | undefined;
|
|
2807
|
+
rawType?: string | undefined;
|
|
2808
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
2809
|
+
} | undefined>;
|
|
2810
|
+
}, {
|
|
2811
|
+
columns: Record<string, {
|
|
2812
|
+
isArray?: boolean | undefined;
|
|
2813
|
+
dimensions?: number | undefined;
|
|
2814
|
+
rawType?: string | undefined;
|
|
2815
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
2816
|
+
} | undefined>;
|
|
2817
|
+
}>>>;
|
|
2818
|
+
}, "strip", zod.ZodTypeAny, {
|
|
2819
|
+
tables: Record<string, {
|
|
2820
|
+
columns: Record<string, {
|
|
2821
|
+
isArray?: boolean | undefined;
|
|
2822
|
+
dimensions?: number | undefined;
|
|
2823
|
+
rawType?: string | undefined;
|
|
2824
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
2825
|
+
} | undefined>;
|
|
2826
|
+
} | undefined>;
|
|
2827
|
+
}, {
|
|
2828
|
+
tables: Record<string, {
|
|
2829
|
+
columns: Record<string, {
|
|
2830
|
+
isArray?: boolean | undefined;
|
|
2831
|
+
dimensions?: number | undefined;
|
|
2832
|
+
rawType?: string | undefined;
|
|
2833
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
2834
|
+
} | undefined>;
|
|
2835
|
+
} | undefined>;
|
|
2836
|
+
}>>;
|
|
2837
|
+
} & {
|
|
2838
|
+
id: zod.ZodString;
|
|
2839
|
+
prevId: zod.ZodString;
|
|
2840
|
+
}, "strip", zod.ZodTypeAny, {
|
|
2841
|
+
version: "7";
|
|
2842
|
+
dialect: "postgresql";
|
|
2843
|
+
tables: Record<string, {
|
|
2844
|
+
name: string;
|
|
2845
|
+
schema: string;
|
|
2846
|
+
columns: Record<string, {
|
|
2847
|
+
type: string;
|
|
2848
|
+
name: string;
|
|
2849
|
+
primaryKey: boolean;
|
|
2850
|
+
notNull: boolean;
|
|
2851
|
+
typeSchema?: string | undefined;
|
|
2852
|
+
default?: any;
|
|
2853
|
+
isUnique?: any;
|
|
2854
|
+
uniqueName?: string | undefined;
|
|
2855
|
+
nullsNotDistinct?: boolean | undefined;
|
|
2856
|
+
generated?: {
|
|
2857
|
+
type: "stored";
|
|
2858
|
+
as: string;
|
|
2859
|
+
} | undefined;
|
|
2860
|
+
identity?: {
|
|
2861
|
+
type: "always" | "byDefault";
|
|
2862
|
+
name: string;
|
|
2863
|
+
schema: string;
|
|
2864
|
+
increment?: string | undefined;
|
|
2865
|
+
minValue?: string | undefined;
|
|
2866
|
+
maxValue?: string | undefined;
|
|
2867
|
+
startWith?: string | undefined;
|
|
2868
|
+
cache?: string | undefined;
|
|
2869
|
+
cycle?: boolean | undefined;
|
|
2870
|
+
} | undefined;
|
|
2871
|
+
}>;
|
|
2872
|
+
indexes: Record<string, {
|
|
2873
|
+
name: string;
|
|
2874
|
+
columns: {
|
|
2875
|
+
expression: string;
|
|
2876
|
+
isExpression: boolean;
|
|
2877
|
+
asc: boolean;
|
|
2878
|
+
nulls?: string | undefined;
|
|
2879
|
+
opclass?: string | undefined;
|
|
2880
|
+
}[];
|
|
2881
|
+
isUnique: boolean;
|
|
2882
|
+
method: string;
|
|
2883
|
+
concurrently: boolean;
|
|
2884
|
+
with?: Record<string, any> | undefined;
|
|
2885
|
+
where?: string | undefined;
|
|
2886
|
+
}>;
|
|
2887
|
+
foreignKeys: Record<string, {
|
|
2888
|
+
name: string;
|
|
2889
|
+
tableFrom: string;
|
|
2890
|
+
columnsFrom: string[];
|
|
2891
|
+
tableTo: string;
|
|
2892
|
+
columnsTo: string[];
|
|
2893
|
+
schemaTo?: string | undefined;
|
|
2894
|
+
onUpdate?: string | undefined;
|
|
2895
|
+
onDelete?: string | undefined;
|
|
2896
|
+
}>;
|
|
2897
|
+
compositePrimaryKeys: Record<string, {
|
|
2898
|
+
name: string;
|
|
2899
|
+
columns: string[];
|
|
2900
|
+
}>;
|
|
2901
|
+
uniqueConstraints: Record<string, {
|
|
2902
|
+
name: string;
|
|
2903
|
+
columns: string[];
|
|
2904
|
+
nullsNotDistinct: boolean;
|
|
2905
|
+
}>;
|
|
2906
|
+
policies: Record<string, {
|
|
2907
|
+
name: string;
|
|
2908
|
+
schema?: string | undefined;
|
|
2909
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
2910
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
2911
|
+
to?: string[] | undefined;
|
|
2912
|
+
using?: string | undefined;
|
|
2913
|
+
withCheck?: string | undefined;
|
|
2914
|
+
on?: string | undefined;
|
|
2915
|
+
}>;
|
|
2916
|
+
checkConstraints: Record<string, {
|
|
2917
|
+
value: string;
|
|
2918
|
+
name: string;
|
|
2919
|
+
}>;
|
|
2920
|
+
isRLSEnabled: boolean;
|
|
2921
|
+
}>;
|
|
2922
|
+
policies: Record<string, {
|
|
2923
|
+
name: string;
|
|
2924
|
+
schema?: string | undefined;
|
|
2925
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
2926
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
2927
|
+
to?: string[] | undefined;
|
|
2928
|
+
using?: string | undefined;
|
|
2929
|
+
withCheck?: string | undefined;
|
|
2930
|
+
on?: string | undefined;
|
|
2931
|
+
}>;
|
|
2932
|
+
enums: Record<string, {
|
|
2933
|
+
values: string[];
|
|
2934
|
+
name: string;
|
|
2935
|
+
schema: string;
|
|
2936
|
+
}>;
|
|
2937
|
+
schemas: Record<string, string>;
|
|
2938
|
+
views: Record<string, {
|
|
2939
|
+
name: string;
|
|
2940
|
+
schema: string;
|
|
2941
|
+
columns: Record<string, {
|
|
2942
|
+
type: string;
|
|
2943
|
+
name: string;
|
|
2944
|
+
primaryKey: boolean;
|
|
2945
|
+
notNull: boolean;
|
|
2946
|
+
typeSchema?: string | undefined;
|
|
2947
|
+
default?: any;
|
|
2948
|
+
isUnique?: any;
|
|
2949
|
+
uniqueName?: string | undefined;
|
|
2950
|
+
nullsNotDistinct?: boolean | undefined;
|
|
2951
|
+
generated?: {
|
|
2952
|
+
type: "stored";
|
|
2953
|
+
as: string;
|
|
2954
|
+
} | undefined;
|
|
2955
|
+
identity?: {
|
|
2956
|
+
type: "always" | "byDefault";
|
|
2957
|
+
name: string;
|
|
2958
|
+
schema: string;
|
|
2959
|
+
increment?: string | undefined;
|
|
2960
|
+
minValue?: string | undefined;
|
|
2961
|
+
maxValue?: string | undefined;
|
|
2962
|
+
startWith?: string | undefined;
|
|
2963
|
+
cache?: string | undefined;
|
|
2964
|
+
cycle?: boolean | undefined;
|
|
2965
|
+
} | undefined;
|
|
2966
|
+
}>;
|
|
2967
|
+
materialized: boolean;
|
|
2968
|
+
isExisting: boolean;
|
|
2969
|
+
with?: {
|
|
2970
|
+
checkOption?: "local" | "cascaded" | undefined;
|
|
2971
|
+
securityBarrier?: boolean | undefined;
|
|
2972
|
+
securityInvoker?: boolean | undefined;
|
|
2973
|
+
fillfactor?: number | undefined;
|
|
2974
|
+
toastTupleTarget?: number | undefined;
|
|
2975
|
+
parallelWorkers?: number | undefined;
|
|
2976
|
+
autovacuumEnabled?: boolean | undefined;
|
|
2977
|
+
vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
|
|
2978
|
+
vacuumTruncate?: boolean | undefined;
|
|
2979
|
+
autovacuumVacuumThreshold?: number | undefined;
|
|
2980
|
+
autovacuumVacuumScaleFactor?: number | undefined;
|
|
2981
|
+
autovacuumVacuumCostDelay?: number | undefined;
|
|
2982
|
+
autovacuumVacuumCostLimit?: number | undefined;
|
|
2983
|
+
autovacuumFreezeMinAge?: number | undefined;
|
|
2984
|
+
autovacuumFreezeMaxAge?: number | undefined;
|
|
2985
|
+
autovacuumFreezeTableAge?: number | undefined;
|
|
2986
|
+
autovacuumMultixactFreezeMinAge?: number | undefined;
|
|
2987
|
+
autovacuumMultixactFreezeMaxAge?: number | undefined;
|
|
2988
|
+
autovacuumMultixactFreezeTableAge?: number | undefined;
|
|
2989
|
+
logAutovacuumMinDuration?: number | undefined;
|
|
2990
|
+
userCatalogTable?: boolean | undefined;
|
|
2991
|
+
} | undefined;
|
|
2992
|
+
using?: string | undefined;
|
|
2993
|
+
definition?: string | undefined;
|
|
2994
|
+
withNoData?: boolean | undefined;
|
|
2995
|
+
tablespace?: string | undefined;
|
|
2996
|
+
}>;
|
|
2997
|
+
sequences: Record<string, {
|
|
2998
|
+
name: string;
|
|
2999
|
+
schema: string;
|
|
3000
|
+
increment?: string | undefined;
|
|
3001
|
+
minValue?: string | undefined;
|
|
3002
|
+
maxValue?: string | undefined;
|
|
3003
|
+
startWith?: string | undefined;
|
|
3004
|
+
cache?: string | undefined;
|
|
3005
|
+
cycle?: boolean | undefined;
|
|
3006
|
+
}>;
|
|
3007
|
+
roles: Record<string, {
|
|
3008
|
+
name: string;
|
|
3009
|
+
createDb?: boolean | undefined;
|
|
3010
|
+
createRole?: boolean | undefined;
|
|
3011
|
+
inherit?: boolean | undefined;
|
|
3012
|
+
}>;
|
|
3013
|
+
_meta: {
|
|
3014
|
+
tables: Record<string, string>;
|
|
3015
|
+
columns: Record<string, string>;
|
|
3016
|
+
schemas: Record<string, string>;
|
|
3017
|
+
};
|
|
3018
|
+
id: string;
|
|
3019
|
+
prevId: string;
|
|
3020
|
+
internal?: {
|
|
3021
|
+
tables: Record<string, {
|
|
3022
|
+
columns: Record<string, {
|
|
3023
|
+
isArray?: boolean | undefined;
|
|
3024
|
+
dimensions?: number | undefined;
|
|
3025
|
+
rawType?: string | undefined;
|
|
3026
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
3027
|
+
} | undefined>;
|
|
3028
|
+
} | undefined>;
|
|
3029
|
+
} | undefined;
|
|
3030
|
+
}, {
|
|
3031
|
+
version: "7";
|
|
3032
|
+
dialect: "postgresql";
|
|
3033
|
+
tables: Record<string, {
|
|
3034
|
+
name: string;
|
|
3035
|
+
schema: string;
|
|
3036
|
+
columns: Record<string, {
|
|
3037
|
+
type: string;
|
|
3038
|
+
name: string;
|
|
3039
|
+
primaryKey: boolean;
|
|
3040
|
+
notNull: boolean;
|
|
3041
|
+
typeSchema?: string | undefined;
|
|
3042
|
+
default?: any;
|
|
3043
|
+
isUnique?: any;
|
|
3044
|
+
uniqueName?: string | undefined;
|
|
3045
|
+
nullsNotDistinct?: boolean | undefined;
|
|
3046
|
+
generated?: {
|
|
3047
|
+
type: "stored";
|
|
3048
|
+
as: string;
|
|
3049
|
+
} | undefined;
|
|
3050
|
+
identity?: {
|
|
3051
|
+
type: "always" | "byDefault";
|
|
3052
|
+
name: string;
|
|
3053
|
+
schema: string;
|
|
3054
|
+
increment?: string | undefined;
|
|
3055
|
+
minValue?: string | undefined;
|
|
3056
|
+
maxValue?: string | undefined;
|
|
3057
|
+
startWith?: string | undefined;
|
|
3058
|
+
cache?: string | undefined;
|
|
3059
|
+
cycle?: boolean | undefined;
|
|
3060
|
+
} | undefined;
|
|
3061
|
+
}>;
|
|
3062
|
+
indexes: Record<string, {
|
|
3063
|
+
name: string;
|
|
3064
|
+
columns: {
|
|
3065
|
+
expression: string;
|
|
3066
|
+
isExpression: boolean;
|
|
3067
|
+
asc: boolean;
|
|
3068
|
+
nulls?: string | undefined;
|
|
3069
|
+
opclass?: string | undefined;
|
|
3070
|
+
}[];
|
|
3071
|
+
isUnique: boolean;
|
|
3072
|
+
with?: Record<string, any> | undefined;
|
|
3073
|
+
method?: string | undefined;
|
|
3074
|
+
where?: string | undefined;
|
|
3075
|
+
concurrently?: boolean | undefined;
|
|
3076
|
+
}>;
|
|
3077
|
+
foreignKeys: Record<string, {
|
|
3078
|
+
name: string;
|
|
3079
|
+
tableFrom: string;
|
|
3080
|
+
columnsFrom: string[];
|
|
3081
|
+
tableTo: string;
|
|
3082
|
+
columnsTo: string[];
|
|
3083
|
+
schemaTo?: string | undefined;
|
|
3084
|
+
onUpdate?: string | undefined;
|
|
3085
|
+
onDelete?: string | undefined;
|
|
3086
|
+
}>;
|
|
3087
|
+
compositePrimaryKeys: Record<string, {
|
|
3088
|
+
name: string;
|
|
3089
|
+
columns: string[];
|
|
3090
|
+
}>;
|
|
3091
|
+
uniqueConstraints?: Record<string, {
|
|
3092
|
+
name: string;
|
|
3093
|
+
columns: string[];
|
|
3094
|
+
nullsNotDistinct: boolean;
|
|
3095
|
+
}> | undefined;
|
|
3096
|
+
policies?: Record<string, {
|
|
3097
|
+
name: string;
|
|
3098
|
+
schema?: string | undefined;
|
|
3099
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
3100
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
3101
|
+
to?: string[] | undefined;
|
|
3102
|
+
using?: string | undefined;
|
|
3103
|
+
withCheck?: string | undefined;
|
|
3104
|
+
on?: string | undefined;
|
|
3105
|
+
}> | undefined;
|
|
3106
|
+
checkConstraints?: Record<string, {
|
|
3107
|
+
value: string;
|
|
3108
|
+
name: string;
|
|
3109
|
+
}> | undefined;
|
|
3110
|
+
isRLSEnabled?: boolean | undefined;
|
|
3111
|
+
}>;
|
|
3112
|
+
enums: Record<string, {
|
|
3113
|
+
values: string[];
|
|
3114
|
+
name: string;
|
|
3115
|
+
schema: string;
|
|
3116
|
+
}>;
|
|
3117
|
+
schemas: Record<string, string>;
|
|
3118
|
+
_meta: {
|
|
3119
|
+
tables: Record<string, string>;
|
|
3120
|
+
columns: Record<string, string>;
|
|
3121
|
+
schemas: Record<string, string>;
|
|
3122
|
+
};
|
|
3123
|
+
id: string;
|
|
3124
|
+
prevId: string;
|
|
3125
|
+
policies?: Record<string, {
|
|
3126
|
+
name: string;
|
|
3127
|
+
schema?: string | undefined;
|
|
3128
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
3129
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
3130
|
+
to?: string[] | undefined;
|
|
3131
|
+
using?: string | undefined;
|
|
3132
|
+
withCheck?: string | undefined;
|
|
3133
|
+
on?: string | undefined;
|
|
3134
|
+
}> | undefined;
|
|
3135
|
+
views?: Record<string, {
|
|
3136
|
+
name: string;
|
|
3137
|
+
schema: string;
|
|
3138
|
+
columns: Record<string, {
|
|
3139
|
+
type: string;
|
|
3140
|
+
name: string;
|
|
3141
|
+
primaryKey: boolean;
|
|
3142
|
+
notNull: boolean;
|
|
3143
|
+
typeSchema?: string | undefined;
|
|
3144
|
+
default?: any;
|
|
3145
|
+
isUnique?: any;
|
|
3146
|
+
uniqueName?: string | undefined;
|
|
3147
|
+
nullsNotDistinct?: boolean | undefined;
|
|
3148
|
+
generated?: {
|
|
3149
|
+
type: "stored";
|
|
3150
|
+
as: string;
|
|
3151
|
+
} | undefined;
|
|
3152
|
+
identity?: {
|
|
3153
|
+
type: "always" | "byDefault";
|
|
3154
|
+
name: string;
|
|
3155
|
+
schema: string;
|
|
3156
|
+
increment?: string | undefined;
|
|
3157
|
+
minValue?: string | undefined;
|
|
3158
|
+
maxValue?: string | undefined;
|
|
3159
|
+
startWith?: string | undefined;
|
|
3160
|
+
cache?: string | undefined;
|
|
3161
|
+
cycle?: boolean | undefined;
|
|
3162
|
+
} | undefined;
|
|
3163
|
+
}>;
|
|
3164
|
+
materialized: boolean;
|
|
3165
|
+
isExisting: boolean;
|
|
3166
|
+
with?: {
|
|
3167
|
+
checkOption?: "local" | "cascaded" | undefined;
|
|
3168
|
+
securityBarrier?: boolean | undefined;
|
|
3169
|
+
securityInvoker?: boolean | undefined;
|
|
3170
|
+
fillfactor?: number | undefined;
|
|
3171
|
+
toastTupleTarget?: number | undefined;
|
|
3172
|
+
parallelWorkers?: number | undefined;
|
|
3173
|
+
autovacuumEnabled?: boolean | undefined;
|
|
3174
|
+
vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
|
|
3175
|
+
vacuumTruncate?: boolean | undefined;
|
|
3176
|
+
autovacuumVacuumThreshold?: number | undefined;
|
|
3177
|
+
autovacuumVacuumScaleFactor?: number | undefined;
|
|
3178
|
+
autovacuumVacuumCostDelay?: number | undefined;
|
|
3179
|
+
autovacuumVacuumCostLimit?: number | undefined;
|
|
3180
|
+
autovacuumFreezeMinAge?: number | undefined;
|
|
3181
|
+
autovacuumFreezeMaxAge?: number | undefined;
|
|
3182
|
+
autovacuumFreezeTableAge?: number | undefined;
|
|
3183
|
+
autovacuumMultixactFreezeMinAge?: number | undefined;
|
|
3184
|
+
autovacuumMultixactFreezeMaxAge?: number | undefined;
|
|
3185
|
+
autovacuumMultixactFreezeTableAge?: number | undefined;
|
|
3186
|
+
logAutovacuumMinDuration?: number | undefined;
|
|
3187
|
+
userCatalogTable?: boolean | undefined;
|
|
3188
|
+
} | undefined;
|
|
3189
|
+
using?: string | undefined;
|
|
3190
|
+
definition?: string | undefined;
|
|
3191
|
+
withNoData?: boolean | undefined;
|
|
3192
|
+
tablespace?: string | undefined;
|
|
3193
|
+
}> | undefined;
|
|
3194
|
+
sequences?: Record<string, {
|
|
3195
|
+
name: string;
|
|
3196
|
+
schema: string;
|
|
3197
|
+
increment?: string | undefined;
|
|
3198
|
+
minValue?: string | undefined;
|
|
3199
|
+
maxValue?: string | undefined;
|
|
3200
|
+
startWith?: string | undefined;
|
|
3201
|
+
cache?: string | undefined;
|
|
3202
|
+
cycle?: boolean | undefined;
|
|
3203
|
+
}> | undefined;
|
|
3204
|
+
roles?: Record<string, {
|
|
3205
|
+
name: string;
|
|
3206
|
+
createDb?: boolean | undefined;
|
|
3207
|
+
createRole?: boolean | undefined;
|
|
3208
|
+
inherit?: boolean | undefined;
|
|
3209
|
+
}> | undefined;
|
|
3210
|
+
internal?: {
|
|
3211
|
+
tables: Record<string, {
|
|
3212
|
+
columns: Record<string, {
|
|
3213
|
+
isArray?: boolean | undefined;
|
|
3214
|
+
dimensions?: number | undefined;
|
|
3215
|
+
rawType?: string | undefined;
|
|
3216
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
3217
|
+
} | undefined>;
|
|
3218
|
+
} | 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
|
+
type: string;
|
|
3248
|
+
name: string;
|
|
3249
|
+
primaryKey: boolean;
|
|
3250
|
+
notNull: boolean;
|
|
3251
|
+
default?: any;
|
|
3252
|
+
generated?: {
|
|
3253
|
+
type: "stored" | "virtual";
|
|
3254
|
+
as: string;
|
|
3255
|
+
} | undefined;
|
|
3256
|
+
onUpdate?: any;
|
|
3257
|
+
autoincrement?: boolean | undefined;
|
|
3258
|
+
}, {
|
|
3259
|
+
type: string;
|
|
3260
|
+
name: string;
|
|
3261
|
+
primaryKey: boolean;
|
|
3262
|
+
notNull: boolean;
|
|
3263
|
+
default?: any;
|
|
3264
|
+
generated?: {
|
|
3265
|
+
type: "stored" | "virtual";
|
|
3266
|
+
as: string;
|
|
3267
|
+
} | undefined;
|
|
3268
|
+
onUpdate?: any;
|
|
3269
|
+
autoincrement?: boolean | 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?: "default" | "none" | "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?: "default" | "none" | "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
|
+
type: string;
|
|
3317
|
+
name: string;
|
|
3318
|
+
primaryKey: boolean;
|
|
3319
|
+
notNull: boolean;
|
|
3320
|
+
default?: any;
|
|
3321
|
+
generated?: {
|
|
3322
|
+
type: "stored" | "virtual";
|
|
3323
|
+
as: string;
|
|
3324
|
+
} | undefined;
|
|
3325
|
+
onUpdate?: any;
|
|
3326
|
+
autoincrement?: boolean | 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?: "default" | "none" | "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
|
+
type: string;
|
|
3348
|
+
name: string;
|
|
3349
|
+
primaryKey: boolean;
|
|
3350
|
+
notNull: boolean;
|
|
3351
|
+
default?: any;
|
|
3352
|
+
generated?: {
|
|
3353
|
+
type: "stored" | "virtual";
|
|
3354
|
+
as: string;
|
|
3355
|
+
} | undefined;
|
|
3356
|
+
onUpdate?: any;
|
|
3357
|
+
autoincrement?: boolean | 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?: "default" | "none" | "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
|
+
tables: Record<string, string>;
|
|
3381
|
+
columns: Record<string, string>;
|
|
3382
|
+
}, {
|
|
3383
|
+
tables: Record<string, string>;
|
|
3384
|
+
columns: 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
|
+
tables?: Record<string, {
|
|
3423
|
+
columns: Record<string, {
|
|
3424
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
3425
|
+
} | undefined>;
|
|
3426
|
+
} | undefined> | undefined;
|
|
3427
|
+
indexes?: Record<string, {
|
|
3428
|
+
columns: Record<string, {
|
|
3429
|
+
isExpression?: boolean | undefined;
|
|
3430
|
+
} | undefined>;
|
|
3431
|
+
} | undefined> | undefined;
|
|
3432
|
+
}, {
|
|
3433
|
+
tables?: Record<string, {
|
|
3434
|
+
columns: Record<string, {
|
|
3435
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
3436
|
+
} | undefined>;
|
|
3437
|
+
} | undefined> | undefined;
|
|
3438
|
+
indexes?: Record<string, {
|
|
3439
|
+
columns: Record<string, {
|
|
3440
|
+
isExpression?: boolean | undefined;
|
|
3441
|
+
} | undefined>;
|
|
3442
|
+
} | undefined> | undefined;
|
|
3443
|
+
}>>;
|
|
3444
|
+
} & {
|
|
3445
|
+
id: zod.ZodString;
|
|
3446
|
+
prevId: zod.ZodString;
|
|
3447
|
+
}, "strip", zod.ZodTypeAny, {
|
|
3448
|
+
version: "1";
|
|
3449
|
+
dialect: "singlestore";
|
|
3450
|
+
tables: Record<string, {
|
|
3451
|
+
name: string;
|
|
3452
|
+
columns: Record<string, {
|
|
3453
|
+
type: string;
|
|
3454
|
+
name: string;
|
|
3455
|
+
primaryKey: boolean;
|
|
3456
|
+
notNull: boolean;
|
|
3457
|
+
default?: any;
|
|
3458
|
+
generated?: {
|
|
3459
|
+
type: "stored" | "virtual";
|
|
3460
|
+
as: string;
|
|
3461
|
+
} | undefined;
|
|
3462
|
+
onUpdate?: any;
|
|
3463
|
+
autoincrement?: boolean | undefined;
|
|
3464
|
+
}>;
|
|
3465
|
+
indexes: Record<string, {
|
|
3466
|
+
name: string;
|
|
3467
|
+
columns: string[];
|
|
3468
|
+
isUnique: boolean;
|
|
3469
|
+
using?: "btree" | "hash" | undefined;
|
|
3470
|
+
algorithm?: "default" | "inplace" | "copy" | undefined;
|
|
3471
|
+
lock?: "default" | "none" | "shared" | "exclusive" | undefined;
|
|
3472
|
+
}>;
|
|
3473
|
+
compositePrimaryKeys: Record<string, {
|
|
3474
|
+
name: string;
|
|
3475
|
+
columns: string[];
|
|
3476
|
+
}>;
|
|
3477
|
+
uniqueConstraints: Record<string, {
|
|
3478
|
+
name: string;
|
|
3479
|
+
columns: string[];
|
|
3480
|
+
}>;
|
|
3481
|
+
}>;
|
|
3482
|
+
_meta: {
|
|
3483
|
+
tables: Record<string, string>;
|
|
3484
|
+
columns: Record<string, string>;
|
|
3485
|
+
};
|
|
3486
|
+
id: string;
|
|
3487
|
+
prevId: string;
|
|
3488
|
+
internal?: {
|
|
3489
|
+
tables?: Record<string, {
|
|
3490
|
+
columns: Record<string, {
|
|
3491
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
3492
|
+
} | undefined>;
|
|
3493
|
+
} | undefined> | undefined;
|
|
3494
|
+
indexes?: Record<string, {
|
|
3495
|
+
columns: Record<string, {
|
|
3496
|
+
isExpression?: boolean | undefined;
|
|
3497
|
+
} | undefined>;
|
|
3498
|
+
} | undefined> | undefined;
|
|
3499
|
+
} | undefined;
|
|
3500
|
+
}, {
|
|
3501
|
+
version: "1";
|
|
3502
|
+
dialect: "singlestore";
|
|
3503
|
+
tables: Record<string, {
|
|
3504
|
+
name: string;
|
|
3505
|
+
columns: Record<string, {
|
|
3506
|
+
type: string;
|
|
3507
|
+
name: string;
|
|
3508
|
+
primaryKey: boolean;
|
|
3509
|
+
notNull: boolean;
|
|
3510
|
+
default?: any;
|
|
3511
|
+
generated?: {
|
|
3512
|
+
type: "stored" | "virtual";
|
|
3513
|
+
as: string;
|
|
3514
|
+
} | undefined;
|
|
3515
|
+
onUpdate?: any;
|
|
3516
|
+
autoincrement?: boolean | undefined;
|
|
3517
|
+
}>;
|
|
3518
|
+
indexes: Record<string, {
|
|
3519
|
+
name: string;
|
|
3520
|
+
columns: string[];
|
|
3521
|
+
isUnique: boolean;
|
|
3522
|
+
using?: "btree" | "hash" | undefined;
|
|
3523
|
+
algorithm?: "default" | "inplace" | "copy" | undefined;
|
|
3524
|
+
lock?: "default" | "none" | "shared" | "exclusive" | undefined;
|
|
3525
|
+
}>;
|
|
3526
|
+
compositePrimaryKeys: Record<string, {
|
|
3527
|
+
name: string;
|
|
3528
|
+
columns: string[];
|
|
3529
|
+
}>;
|
|
3530
|
+
uniqueConstraints?: Record<string, {
|
|
3531
|
+
name: string;
|
|
3532
|
+
columns: string[];
|
|
3533
|
+
}> | undefined;
|
|
3534
|
+
}>;
|
|
3535
|
+
_meta: {
|
|
3536
|
+
tables: Record<string, string>;
|
|
3537
|
+
columns: Record<string, string>;
|
|
3538
|
+
};
|
|
3539
|
+
id: string;
|
|
3540
|
+
prevId: string;
|
|
3541
|
+
internal?: {
|
|
3542
|
+
tables?: Record<string, {
|
|
3543
|
+
columns: Record<string, {
|
|
3544
|
+
isDefaultAnExpression?: boolean | undefined;
|
|
3545
|
+
} | undefined>;
|
|
3546
|
+
} | undefined> | undefined;
|
|
3547
|
+
indexes?: Record<string, {
|
|
3548
|
+
columns: Record<string, {
|
|
3549
|
+
isExpression?: 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
|
+
type: string;
|
|
3580
|
+
name: string;
|
|
3581
|
+
primaryKey: boolean;
|
|
3582
|
+
notNull: boolean;
|
|
3583
|
+
default?: any;
|
|
3584
|
+
generated?: {
|
|
3585
|
+
type: "stored" | "virtual";
|
|
3586
|
+
as: string;
|
|
3587
|
+
} | undefined;
|
|
3588
|
+
autoincrement?: boolean | undefined;
|
|
3589
|
+
}, {
|
|
3590
|
+
type: string;
|
|
3591
|
+
name: string;
|
|
3592
|
+
primaryKey: boolean;
|
|
3593
|
+
notNull: boolean;
|
|
3594
|
+
default?: any;
|
|
3595
|
+
generated?: {
|
|
3596
|
+
type: "stored" | "virtual";
|
|
3597
|
+
as: string;
|
|
3598
|
+
} | undefined;
|
|
3599
|
+
autoincrement?: boolean | 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
|
+
value: string;
|
|
3667
|
+
name: string;
|
|
3668
|
+
}, {
|
|
3669
|
+
value: string;
|
|
3670
|
+
name: string;
|
|
3671
|
+
}>>>;
|
|
3672
|
+
}, "strict", zod.ZodTypeAny, {
|
|
3673
|
+
name: string;
|
|
3674
|
+
columns: Record<string, {
|
|
3675
|
+
type: string;
|
|
3676
|
+
name: string;
|
|
3677
|
+
primaryKey: boolean;
|
|
3678
|
+
notNull: boolean;
|
|
3679
|
+
default?: any;
|
|
3680
|
+
generated?: {
|
|
3681
|
+
type: "stored" | "virtual";
|
|
3682
|
+
as: string;
|
|
3683
|
+
} | undefined;
|
|
3684
|
+
autoincrement?: boolean | 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
|
+
value: string;
|
|
3711
|
+
name: string;
|
|
3712
|
+
}>;
|
|
3713
|
+
}, {
|
|
3714
|
+
name: string;
|
|
3715
|
+
columns: Record<string, {
|
|
3716
|
+
type: string;
|
|
3717
|
+
name: string;
|
|
3718
|
+
primaryKey: boolean;
|
|
3719
|
+
notNull: boolean;
|
|
3720
|
+
default?: any;
|
|
3721
|
+
generated?: {
|
|
3722
|
+
type: "stored" | "virtual";
|
|
3723
|
+
as: string;
|
|
3724
|
+
} | undefined;
|
|
3725
|
+
autoincrement?: boolean | 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
|
+
value: string;
|
|
3752
|
+
name: 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
|
+
type: string;
|
|
3776
|
+
name: string;
|
|
3777
|
+
primaryKey: boolean;
|
|
3778
|
+
notNull: boolean;
|
|
3779
|
+
default?: any;
|
|
3780
|
+
generated?: {
|
|
3781
|
+
type: "stored" | "virtual";
|
|
3782
|
+
as: string;
|
|
3783
|
+
} | undefined;
|
|
3784
|
+
autoincrement?: boolean | undefined;
|
|
3785
|
+
}, {
|
|
3786
|
+
type: string;
|
|
3787
|
+
name: string;
|
|
3788
|
+
primaryKey: boolean;
|
|
3789
|
+
notNull: boolean;
|
|
3790
|
+
default?: any;
|
|
3791
|
+
generated?: {
|
|
3792
|
+
type: "stored" | "virtual";
|
|
3793
|
+
as: string;
|
|
3794
|
+
} | undefined;
|
|
3795
|
+
autoincrement?: boolean | undefined;
|
|
3796
|
+
}>>;
|
|
3797
|
+
definition: zod.ZodOptional<zod.ZodString>;
|
|
3798
|
+
isExisting: zod.ZodBoolean;
|
|
3799
|
+
}, "strict", zod.ZodTypeAny, {
|
|
3800
|
+
name: string;
|
|
3801
|
+
columns: Record<string, {
|
|
3802
|
+
type: string;
|
|
3803
|
+
name: string;
|
|
3804
|
+
primaryKey: boolean;
|
|
3805
|
+
notNull: boolean;
|
|
3806
|
+
default?: any;
|
|
3807
|
+
generated?: {
|
|
3808
|
+
type: "stored" | "virtual";
|
|
3809
|
+
as: string;
|
|
3810
|
+
} | undefined;
|
|
3811
|
+
autoincrement?: boolean | undefined;
|
|
3812
|
+
}>;
|
|
3813
|
+
isExisting: boolean;
|
|
3814
|
+
definition?: string | undefined;
|
|
3815
|
+
}, {
|
|
3816
|
+
name: string;
|
|
3817
|
+
columns: Record<string, {
|
|
3818
|
+
type: string;
|
|
3819
|
+
name: string;
|
|
3820
|
+
primaryKey: boolean;
|
|
3821
|
+
notNull: boolean;
|
|
3822
|
+
default?: any;
|
|
3823
|
+
generated?: {
|
|
3824
|
+
type: "stored" | "virtual";
|
|
3825
|
+
as: string;
|
|
3826
|
+
} | undefined;
|
|
3827
|
+
autoincrement?: boolean | 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
|
+
tables: Record<string, string>;
|
|
3838
|
+
columns: Record<string, string>;
|
|
3839
|
+
}, {
|
|
3840
|
+
tables: Record<string, string>;
|
|
3841
|
+
columns: 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
|
+
version: "6";
|
|
3879
|
+
dialect: "sqlite";
|
|
3880
|
+
tables: Record<string, {
|
|
3881
|
+
name: string;
|
|
3882
|
+
columns: Record<string, {
|
|
3883
|
+
type: string;
|
|
3884
|
+
name: string;
|
|
3885
|
+
primaryKey: boolean;
|
|
3886
|
+
notNull: boolean;
|
|
3887
|
+
default?: any;
|
|
3888
|
+
generated?: {
|
|
3889
|
+
type: "stored" | "virtual";
|
|
3890
|
+
as: string;
|
|
3891
|
+
} | undefined;
|
|
3892
|
+
autoincrement?: boolean | undefined;
|
|
3893
|
+
}>;
|
|
3894
|
+
indexes: Record<string, {
|
|
3895
|
+
name: string;
|
|
3896
|
+
columns: string[];
|
|
3897
|
+
isUnique: boolean;
|
|
3898
|
+
where?: string | undefined;
|
|
3899
|
+
}>;
|
|
3900
|
+
foreignKeys: Record<string, {
|
|
3901
|
+
name: string;
|
|
3902
|
+
tableFrom: string;
|
|
3903
|
+
columnsFrom: string[];
|
|
3904
|
+
tableTo: string;
|
|
3905
|
+
columnsTo: string[];
|
|
3906
|
+
onUpdate?: string | undefined;
|
|
3907
|
+
onDelete?: string | undefined;
|
|
3908
|
+
}>;
|
|
3909
|
+
compositePrimaryKeys: Record<string, {
|
|
3910
|
+
columns: string[];
|
|
3911
|
+
name?: string | undefined;
|
|
3912
|
+
}>;
|
|
3913
|
+
uniqueConstraints: Record<string, {
|
|
3914
|
+
name: string;
|
|
3915
|
+
columns: string[];
|
|
3916
|
+
}>;
|
|
3917
|
+
checkConstraints: Record<string, {
|
|
3918
|
+
value: string;
|
|
3919
|
+
name: string;
|
|
3920
|
+
}>;
|
|
3921
|
+
}>;
|
|
3922
|
+
enums: {};
|
|
3923
|
+
views: Record<string, {
|
|
3924
|
+
name: string;
|
|
3925
|
+
columns: Record<string, {
|
|
3926
|
+
type: string;
|
|
3927
|
+
name: string;
|
|
3928
|
+
primaryKey: boolean;
|
|
3929
|
+
notNull: boolean;
|
|
3930
|
+
default?: any;
|
|
3931
|
+
generated?: {
|
|
3932
|
+
type: "stored" | "virtual";
|
|
3933
|
+
as: string;
|
|
3934
|
+
} | undefined;
|
|
3935
|
+
autoincrement?: boolean | undefined;
|
|
3936
|
+
}>;
|
|
3937
|
+
isExisting: boolean;
|
|
3938
|
+
definition?: string | undefined;
|
|
3939
|
+
}>;
|
|
3940
|
+
_meta: {
|
|
3941
|
+
tables: Record<string, string>;
|
|
3942
|
+
columns: Record<string, string>;
|
|
3943
|
+
};
|
|
3944
|
+
id: string;
|
|
3945
|
+
prevId: string;
|
|
3946
|
+
internal?: {
|
|
3947
|
+
indexes?: Record<string, {
|
|
3948
|
+
columns: Record<string, {
|
|
3949
|
+
isExpression?: boolean | undefined;
|
|
3950
|
+
} | undefined>;
|
|
3951
|
+
} | undefined> | undefined;
|
|
3952
|
+
} | undefined;
|
|
3953
|
+
}, {
|
|
3954
|
+
version: "6";
|
|
3955
|
+
dialect: "sqlite";
|
|
3956
|
+
tables: Record<string, {
|
|
3957
|
+
name: string;
|
|
3958
|
+
columns: Record<string, {
|
|
3959
|
+
type: string;
|
|
3960
|
+
name: string;
|
|
3961
|
+
primaryKey: boolean;
|
|
3962
|
+
notNull: boolean;
|
|
3963
|
+
default?: any;
|
|
3964
|
+
generated?: {
|
|
3965
|
+
type: "stored" | "virtual";
|
|
3966
|
+
as: string;
|
|
3967
|
+
} | undefined;
|
|
3968
|
+
autoincrement?: boolean | undefined;
|
|
3969
|
+
}>;
|
|
3970
|
+
indexes: Record<string, {
|
|
3971
|
+
name: string;
|
|
3972
|
+
columns: string[];
|
|
3973
|
+
isUnique: boolean;
|
|
3974
|
+
where?: string | undefined;
|
|
3975
|
+
}>;
|
|
3976
|
+
foreignKeys: Record<string, {
|
|
3977
|
+
name: string;
|
|
3978
|
+
tableFrom: string;
|
|
3979
|
+
columnsFrom: string[];
|
|
3980
|
+
tableTo: string;
|
|
3981
|
+
columnsTo: string[];
|
|
3982
|
+
onUpdate?: string | undefined;
|
|
3983
|
+
onDelete?: string | undefined;
|
|
3984
|
+
}>;
|
|
3985
|
+
compositePrimaryKeys: Record<string, {
|
|
3986
|
+
columns: string[];
|
|
3987
|
+
name?: string | undefined;
|
|
3988
|
+
}>;
|
|
3989
|
+
uniqueConstraints?: Record<string, {
|
|
3990
|
+
name: string;
|
|
3991
|
+
columns: string[];
|
|
3992
|
+
}> | undefined;
|
|
3993
|
+
checkConstraints?: Record<string, {
|
|
3994
|
+
value: string;
|
|
3995
|
+
name: string;
|
|
3996
|
+
}> | undefined;
|
|
3997
|
+
}>;
|
|
3998
|
+
enums: {};
|
|
3999
|
+
_meta: {
|
|
4000
|
+
tables: Record<string, string>;
|
|
4001
|
+
columns: Record<string, string>;
|
|
4002
|
+
};
|
|
4003
|
+
id: string;
|
|
4004
|
+
prevId: string;
|
|
4005
|
+
views?: Record<string, {
|
|
4006
|
+
name: string;
|
|
4007
|
+
columns: Record<string, {
|
|
4008
|
+
type: string;
|
|
4009
|
+
name: string;
|
|
4010
|
+
primaryKey: boolean;
|
|
4011
|
+
notNull: boolean;
|
|
4012
|
+
default?: any;
|
|
4013
|
+
generated?: {
|
|
4014
|
+
type: "stored" | "virtual";
|
|
4015
|
+
as: string;
|
|
4016
|
+
} | undefined;
|
|
4017
|
+
autoincrement?: boolean | undefined;
|
|
4018
|
+
}>;
|
|
4019
|
+
isExisting: boolean;
|
|
4020
|
+
definition?: string | undefined;
|
|
4021
|
+
}> | undefined;
|
|
4022
|
+
internal?: {
|
|
4023
|
+
indexes?: Record<string, {
|
|
4024
|
+
columns: Record<string, {
|
|
4025
|
+
isExpression?: boolean | undefined;
|
|
4026
|
+
} | undefined>;
|
|
4027
|
+
} | undefined> | 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
|
+
version: "7";
|
|
4070
|
+
dialect: "postgresql";
|
|
4071
|
+
tables: Record<string, {
|
|
4072
|
+
name: string;
|
|
4073
|
+
schema: string;
|
|
4074
|
+
columns: Record<string, {
|
|
4075
|
+
type: string;
|
|
4076
|
+
name: string;
|
|
4077
|
+
primaryKey: boolean;
|
|
4078
|
+
notNull: boolean;
|
|
4079
|
+
typeSchema?: string | undefined;
|
|
4080
|
+
default?: any;
|
|
4081
|
+
isUnique?: any;
|
|
4082
|
+
uniqueName?: string | undefined;
|
|
4083
|
+
nullsNotDistinct?: boolean | undefined;
|
|
4084
|
+
generated?: {
|
|
4085
|
+
type: "stored";
|
|
4086
|
+
as: string;
|
|
4087
|
+
} | undefined;
|
|
4088
|
+
identity?: {
|
|
4089
|
+
type: "always" | "byDefault";
|
|
4090
|
+
name: string;
|
|
4091
|
+
schema: string;
|
|
4092
|
+
increment?: string | undefined;
|
|
4093
|
+
minValue?: string | undefined;
|
|
4094
|
+
maxValue?: string | undefined;
|
|
4095
|
+
startWith?: string | undefined;
|
|
4096
|
+
cache?: string | undefined;
|
|
4097
|
+
cycle?: boolean | undefined;
|
|
4098
|
+
} | undefined;
|
|
4099
|
+
}>;
|
|
4100
|
+
indexes: Record<string, {
|
|
4101
|
+
name: string;
|
|
4102
|
+
columns: {
|
|
4103
|
+
expression: string;
|
|
4104
|
+
isExpression: boolean;
|
|
4105
|
+
asc: boolean;
|
|
4106
|
+
nulls?: string | undefined;
|
|
4107
|
+
opclass?: string | undefined;
|
|
4108
|
+
}[];
|
|
4109
|
+
isUnique: boolean;
|
|
4110
|
+
method: string;
|
|
4111
|
+
concurrently: boolean;
|
|
4112
|
+
with?: Record<string, any> | undefined;
|
|
4113
|
+
where?: string | undefined;
|
|
4114
|
+
}>;
|
|
4115
|
+
foreignKeys: Record<string, {
|
|
4116
|
+
name: string;
|
|
4117
|
+
tableFrom: string;
|
|
4118
|
+
columnsFrom: string[];
|
|
4119
|
+
tableTo: string;
|
|
4120
|
+
columnsTo: string[];
|
|
4121
|
+
schemaTo?: string | undefined;
|
|
4122
|
+
onUpdate?: string | undefined;
|
|
4123
|
+
onDelete?: string | undefined;
|
|
4124
|
+
}>;
|
|
4125
|
+
compositePrimaryKeys: Record<string, {
|
|
4126
|
+
name: string;
|
|
4127
|
+
columns: string[];
|
|
4128
|
+
}>;
|
|
4129
|
+
uniqueConstraints: Record<string, {
|
|
4130
|
+
name: string;
|
|
4131
|
+
columns: string[];
|
|
4132
|
+
nullsNotDistinct: boolean;
|
|
4133
|
+
}>;
|
|
4134
|
+
policies: Record<string, {
|
|
4135
|
+
name: string;
|
|
4136
|
+
schema?: string | undefined;
|
|
4137
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
4138
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
4139
|
+
to?: string[] | undefined;
|
|
4140
|
+
using?: string | undefined;
|
|
4141
|
+
withCheck?: string | undefined;
|
|
4142
|
+
on?: string | undefined;
|
|
4143
|
+
}>;
|
|
4144
|
+
checkConstraints: Record<string, {
|
|
4145
|
+
value: string;
|
|
4146
|
+
name: string;
|
|
4147
|
+
}>;
|
|
4148
|
+
isRLSEnabled: boolean;
|
|
4149
|
+
}>;
|
|
4150
|
+
policies: Record<string, {
|
|
4151
|
+
name: string;
|
|
4152
|
+
schema?: string | undefined;
|
|
4153
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
|
4154
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
|
4155
|
+
to?: string[] | undefined;
|
|
4156
|
+
using?: string | undefined;
|
|
4157
|
+
withCheck?: string | undefined;
|
|
4158
|
+
on?: string | undefined;
|
|
4159
|
+
}>;
|
|
4160
|
+
enums: Record<string, {
|
|
4161
|
+
values: string[];
|
|
4162
|
+
name: string;
|
|
4163
|
+
schema: string;
|
|
4164
|
+
}>;
|
|
4165
|
+
schemas: Record<string, string>;
|
|
4166
|
+
views: Record<string, {
|
|
4167
|
+
name: string;
|
|
4168
|
+
schema: string;
|
|
4169
|
+
columns: Record<string, {
|
|
4170
|
+
type: string;
|
|
4171
|
+
name: string;
|
|
4172
|
+
primaryKey: boolean;
|
|
4173
|
+
notNull: boolean;
|
|
4174
|
+
typeSchema?: string | undefined;
|
|
4175
|
+
default?: any;
|
|
4176
|
+
isUnique?: any;
|
|
4177
|
+
uniqueName?: string | undefined;
|
|
4178
|
+
nullsNotDistinct?: boolean | undefined;
|
|
4179
|
+
generated?: {
|
|
4180
|
+
type: "stored";
|
|
4181
|
+
as: string;
|
|
4182
|
+
} | undefined;
|
|
4183
|
+
identity?: {
|
|
4184
|
+
type: "always" | "byDefault";
|
|
4185
|
+
name: string;
|
|
4186
|
+
schema: string;
|
|
4187
|
+
increment?: string | undefined;
|
|
4188
|
+
minValue?: string | undefined;
|
|
4189
|
+
maxValue?: string | undefined;
|
|
4190
|
+
startWith?: string | undefined;
|
|
4191
|
+
cache?: string | undefined;
|
|
4192
|
+
cycle?: boolean | undefined;
|
|
4193
|
+
} | undefined;
|
|
4194
|
+
}>;
|
|
4195
|
+
materialized: boolean;
|
|
4196
|
+
isExisting: boolean;
|
|
4197
|
+
with?: {
|
|
4198
|
+
checkOption?: "local" | "cascaded" | undefined;
|
|
4199
|
+
securityBarrier?: boolean | undefined;
|
|
4200
|
+
securityInvoker?: boolean | undefined;
|
|
4201
|
+
fillfactor?: number | undefined;
|
|
4202
|
+
toastTupleTarget?: number | undefined;
|
|
4203
|
+
parallelWorkers?: number | undefined;
|
|
4204
|
+
autovacuumEnabled?: boolean | undefined;
|
|
4205
|
+
vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
|
|
4206
|
+
vacuumTruncate?: boolean | undefined;
|
|
4207
|
+
autovacuumVacuumThreshold?: number | undefined;
|
|
4208
|
+
autovacuumVacuumScaleFactor?: number | undefined;
|
|
4209
|
+
autovacuumVacuumCostDelay?: number | undefined;
|
|
4210
|
+
autovacuumVacuumCostLimit?: number | undefined;
|
|
4211
|
+
autovacuumFreezeMinAge?: number | undefined;
|
|
4212
|
+
autovacuumFreezeMaxAge?: number | undefined;
|
|
4213
|
+
autovacuumFreezeTableAge?: number | undefined;
|
|
4214
|
+
autovacuumMultixactFreezeMinAge?: number | undefined;
|
|
4215
|
+
autovacuumMultixactFreezeMaxAge?: number | undefined;
|
|
4216
|
+
autovacuumMultixactFreezeTableAge?: number | undefined;
|
|
4217
|
+
logAutovacuumMinDuration?: number | undefined;
|
|
4218
|
+
userCatalogTable?: boolean | undefined;
|
|
4219
|
+
} | undefined;
|
|
4220
|
+
using?: string | undefined;
|
|
4221
|
+
definition?: string | undefined;
|
|
4222
|
+
withNoData?: boolean | undefined;
|
|
4223
|
+
tablespace?: string | undefined;
|
|
4224
|
+
}>;
|
|
4225
|
+
sequences: Record<string, {
|
|
4226
|
+
name: string;
|
|
4227
|
+
schema: string;
|
|
4228
|
+
increment?: string | undefined;
|
|
4229
|
+
minValue?: string | undefined;
|
|
4230
|
+
maxValue?: string | undefined;
|
|
4231
|
+
startWith?: string | undefined;
|
|
4232
|
+
cache?: string | undefined;
|
|
4233
|
+
cycle?: boolean | undefined;
|
|
4234
|
+
}>;
|
|
4235
|
+
roles: Record<string, {
|
|
4236
|
+
name: string;
|
|
4237
|
+
createDb?: boolean | undefined;
|
|
4238
|
+
createRole?: boolean | undefined;
|
|
4239
|
+
inherit?: boolean | undefined;
|
|
4240
|
+
}>;
|
|
4241
|
+
_meta: {
|
|
4242
|
+
tables: Record<string, string>;
|
|
4243
|
+
columns: Record<string, string>;
|
|
4244
|
+
schemas: Record<string, string>;
|
|
4245
|
+
};
|
|
4246
|
+
id: string;
|
|
4247
|
+
prevId: string;
|
|
4248
|
+
internal?: {
|
|
4249
|
+
tables: Record<string, {
|
|
4250
|
+
columns: Record<string, {
|
|
4251
|
+
isArray?: boolean | undefined;
|
|
4252
|
+
dimensions?: number | undefined;
|
|
4253
|
+
rawType?: string | undefined;
|
|
4254
|
+
isDefaultAnExpression?: boolean | 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
|
+
}
|
|
1169
4280
|
|
|
1170
4281
|
declare class RepositoryDescriptorProvider {
|
|
1171
4282
|
protected readonly log: _alepha_core.Logger;
|
|
1172
4283
|
protected readonly alepha: Alepha;
|
|
1173
4284
|
protected readonly repositories: Array<Repository<any, TObject>>;
|
|
1174
4285
|
constructor();
|
|
4286
|
+
clearRepositories(): Promise<void>;
|
|
1175
4287
|
protected readonly configure: _alepha_core.HookDescriptor<"configure">;
|
|
1176
4288
|
/**
|
|
1177
4289
|
* Get all repositories.
|
|
@@ -1206,7 +4318,8 @@ declare class RepositoryDescriptorProvider {
|
|
|
1206
4318
|
declare class DrizzleKitProvider {
|
|
1207
4319
|
protected readonly log: _alepha_core.Logger;
|
|
1208
4320
|
protected readonly alepha: Alepha;
|
|
1209
|
-
protected readonly
|
|
4321
|
+
protected readonly repositoryProvider: RepositoryDescriptorProvider;
|
|
4322
|
+
push(provider: PostgresProvider, schema?: string): Promise<void>;
|
|
1210
4323
|
/**
|
|
1211
4324
|
* Try to generate migrations from scratch based on the models.
|
|
1212
4325
|
* Then, execute the migrations.
|
|
@@ -1220,12 +4333,19 @@ declare class DrizzleKitProvider {
|
|
|
1220
4333
|
* @returns A promise that resolves once the migrations have been executed.
|
|
1221
4334
|
*/
|
|
1222
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>;
|
|
1223
4344
|
/**
|
|
1224
|
-
*
|
|
1225
|
-
*
|
|
1226
|
-
* @protected
|
|
4345
|
+
* Try to load the official Drizzle Kit API.
|
|
4346
|
+
* If not available, fallback to the local kit import.
|
|
1227
4347
|
*/
|
|
1228
|
-
protected importDrizzleKit():
|
|
4348
|
+
protected importDrizzleKit(): Promise<typeof DrizzleKit>;
|
|
1229
4349
|
}
|
|
1230
4350
|
|
|
1231
4351
|
declare module "alepha" {
|
|
@@ -1237,6 +4357,7 @@ declare const envSchema$1: _alepha_core.TObject<{
|
|
|
1237
4357
|
PG_USERNAME: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1238
4358
|
PG_DATABASE: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1239
4359
|
PG_PASSWORD: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
4360
|
+
PG_PORT: _sinclair_typebox.TOptional<_sinclair_typebox.TNumber>;
|
|
1240
4361
|
/**
|
|
1241
4362
|
*
|
|
1242
4363
|
*/
|
|
@@ -1245,14 +4366,6 @@ declare const envSchema$1: _alepha_core.TObject<{
|
|
|
1245
4366
|
*
|
|
1246
4367
|
*/
|
|
1247
4368
|
DATABASE_MIGRATIONS_FOLDER: _sinclair_typebox.TString;
|
|
1248
|
-
/**
|
|
1249
|
-
*
|
|
1250
|
-
*/
|
|
1251
|
-
DATABASE_MIGRATIONS_SCHEMA: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1252
|
-
/**
|
|
1253
|
-
*
|
|
1254
|
-
*/
|
|
1255
|
-
DATABASE_MIGRATIONS_TABLE: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
1256
4369
|
/**
|
|
1257
4370
|
* The schema to use.
|
|
1258
4371
|
* Accept a string.
|
|
@@ -1266,13 +4379,21 @@ declare const envSchema$1: _alepha_core.TObject<{
|
|
|
1266
4379
|
*/
|
|
1267
4380
|
POSTGRES_SYNCHRONIZE: _sinclair_typebox.TOptional<_sinclair_typebox.TBoolean>;
|
|
1268
4381
|
/**
|
|
4382
|
+
* Push the schema to the database.
|
|
1269
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
|
|
1270
4391
|
*/
|
|
1271
4392
|
POSTGRES_REJECT_UNAUTHORIZED: _sinclair_typebox.TBoolean;
|
|
1272
4393
|
}>;
|
|
1273
4394
|
interface NodePostgresProviderState {
|
|
1274
|
-
client:
|
|
1275
|
-
db:
|
|
4395
|
+
client: postgres.Sql;
|
|
4396
|
+
db: PostgresJsDatabase;
|
|
1276
4397
|
}
|
|
1277
4398
|
declare class NodePostgresProvider implements PostgresProvider {
|
|
1278
4399
|
readonly dialect = "postgres";
|
|
@@ -1282,10 +4403,10 @@ declare class NodePostgresProvider implements PostgresProvider {
|
|
|
1282
4403
|
PG_USERNAME?: string | undefined;
|
|
1283
4404
|
PG_DATABASE?: string | undefined;
|
|
1284
4405
|
PG_PASSWORD?: string | undefined;
|
|
1285
|
-
|
|
1286
|
-
DATABASE_MIGRATIONS_TABLE?: string | undefined;
|
|
4406
|
+
PG_PORT?: number | undefined;
|
|
1287
4407
|
POSTGRES_SCHEMA?: string | undefined;
|
|
1288
4408
|
POSTGRES_SYNCHRONIZE?: boolean | undefined;
|
|
4409
|
+
POSTGRES_PUSH_SCHEMA?: boolean | undefined;
|
|
1289
4410
|
DATABASE_URL: string;
|
|
1290
4411
|
DATABASE_MIGRATIONS_FOLDER: string;
|
|
1291
4412
|
POSTGRES_REJECT_UNAUTHORIZED: boolean;
|
|
@@ -1297,7 +4418,7 @@ declare class NodePostgresProvider implements PostgresProvider {
|
|
|
1297
4418
|
* In testing mode, the schema name will be generated and deleted after the test.
|
|
1298
4419
|
*/
|
|
1299
4420
|
protected testingSchemaName?: string;
|
|
1300
|
-
get db():
|
|
4421
|
+
get db(): PostgresJsDatabase;
|
|
1301
4422
|
protected readonly configure: _alepha_core.HookDescriptor<"start">;
|
|
1302
4423
|
protected readonly stop: _alepha_core.HookDescriptor<"stop">;
|
|
1303
4424
|
/**
|
|
@@ -1307,14 +4428,12 @@ declare class NodePostgresProvider implements PostgresProvider {
|
|
|
1307
4428
|
execute(query: SQLLike): Promise<any[]>;
|
|
1308
4429
|
connect(): Promise<void>;
|
|
1309
4430
|
close(): Promise<void>;
|
|
1310
|
-
/**
|
|
1311
|
-
*
|
|
1312
|
-
* @protected
|
|
1313
|
-
*/
|
|
1314
4431
|
protected migrate: _alepha_lock.LockDescriptor<() => Promise<void>>;
|
|
1315
4432
|
protected createClient(): NodePostgresProviderState;
|
|
1316
4433
|
protected getMigrationOptions(): MigrationConfig;
|
|
1317
|
-
protected getClientOptions():
|
|
4434
|
+
protected getClientOptions(): postgres.Options<any>;
|
|
4435
|
+
protected sslModes: readonly ["require", "allow", "prefer", "verify-full"];
|
|
4436
|
+
protected ssl(url: URL | undefined): "require" | "allow" | "prefer" | "verify-full" | undefined;
|
|
1318
4437
|
}
|
|
1319
4438
|
|
|
1320
4439
|
/**
|
|
@@ -1326,6 +4445,9 @@ type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & {
|
|
|
1326
4445
|
|
|
1327
4446
|
declare const createdAtSchema: PgAttr<PgAttr<_sinclair_typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
1328
4447
|
|
|
4448
|
+
/**
|
|
4449
|
+
* @deprecated Use `pg.primaryKey()` instead.
|
|
4450
|
+
*/
|
|
1329
4451
|
declare const legacyIdSchema: PgAttr<PgAttr<PgAttr<_sinclair_typebox.TInteger, typeof PG_PRIMARY_KEY>, typeof PG_SERIAL>, typeof PG_DEFAULT>;
|
|
1330
4452
|
|
|
1331
4453
|
/**
|
|
@@ -1371,41 +4493,49 @@ declare module "alepha/core" {
|
|
|
1371
4493
|
}
|
|
1372
4494
|
declare class PostgresTypeProvider {
|
|
1373
4495
|
readonly attr: <T extends TSchema, Attr extends PgSymbolKeys>(type: T, attr: Attr, value?: PgSymbols[Attr]) => PgAttr<T, Attr>;
|
|
1374
|
-
readonly serial: () => PgAttr<_sinclair_typebox.TInteger, typeof PG_SERIAL>;
|
|
1375
|
-
readonly identity: (options?: IntegerOptions) => PgAttr<_sinclair_typebox.TInteger, typeof PG_IDENTITY>;
|
|
1376
|
-
readonly id: (options?: IntegerOptions) => PgAttr<PgAttr<PgAttr<_sinclair_typebox.TInteger, typeof PG_IDENTITY>, typeof PG_DEFAULT>, typeof PG_PRIMARY_KEY>;
|
|
1377
|
-
readonly identityPrimaryKey: (options?: IntegerOptions) => PgAttr<PgAttr<PgAttr<_sinclair_typebox.TInteger, typeof PG_PRIMARY_KEY>, typeof PG_IDENTITY>, typeof PG_DEFAULT>;
|
|
1378
|
-
readonly primaryKey: <T extends TSchema>(type: T) => PgAttr<PgAttr<T, PgDefault>, PgPrimaryKey>;
|
|
1379
4496
|
/**
|
|
1380
|
-
*
|
|
1381
|
-
|
|
1382
|
-
|
|
4497
|
+
* Creates a primary key with an identity column.
|
|
4498
|
+
*/
|
|
4499
|
+
readonly identityPrimaryKey: (identity?: PgIdentityOptions, options?: IntegerOptions) => PgAttr<PgAttr<PgAttr<_sinclair_typebox.TInteger, typeof PG_PRIMARY_KEY>, typeof PG_IDENTITY>, typeof PG_DEFAULT>;
|
|
4500
|
+
/**
|
|
4501
|
+
* Creates a primary key with a big identity column. (default)
|
|
1383
4502
|
*/
|
|
1384
|
-
readonly
|
|
4503
|
+
readonly bigIdentityPrimaryKey: (identity?: PgIdentityOptions, options?: NumberOptions) => PgAttr<PgAttr<PgAttr<_sinclair_typebox.TNumber, typeof PG_PRIMARY_KEY>, typeof PG_IDENTITY>, typeof PG_DEFAULT>;
|
|
4504
|
+
/**
|
|
4505
|
+
* Creates a primary key with a UUID column.
|
|
4506
|
+
*/
|
|
4507
|
+
readonly uuidPrimaryKey: () => PgAttr<PgAttr<_sinclair_typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
1385
4508
|
/**
|
|
1386
4509
|
*
|
|
1387
|
-
* @
|
|
4510
|
+
* @alias bigIdentityPrimaryKey
|
|
4511
|
+
*/
|
|
4512
|
+
readonly primaryKey: (identity?: PgIdentityOptions, options?: NumberOptions) => PgAttr<PgAttr<PgAttr<_sinclair_typebox.TNumber, typeof PG_PRIMARY_KEY>, typeof PG_IDENTITY>, typeof PG_DEFAULT>;
|
|
4513
|
+
/**
|
|
4514
|
+
* Wrap a schema with "default" attribute.
|
|
4515
|
+
* This is used to set a default value for a column in the database.
|
|
4516
|
+
*/
|
|
4517
|
+
readonly default: <T extends TSchema>(type: T, value?: Static<T>) => PgAttr<T, PgDefault>;
|
|
4518
|
+
/**
|
|
4519
|
+
* Creates a column version.
|
|
4520
|
+
* This is used to track the version of a row in the database.
|
|
4521
|
+
* You can use it for optimistic concurrency control.
|
|
1388
4522
|
*/
|
|
1389
4523
|
readonly version: (options?: IntegerOptions) => PgAttr<PgAttr<_sinclair_typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
|
|
1390
4524
|
/**
|
|
1391
|
-
*
|
|
1392
|
-
* @param options
|
|
4525
|
+
* Creates a column Created At. So just a datetime column with a default value of the current timestamp.
|
|
1393
4526
|
*/
|
|
1394
4527
|
readonly createdAt: (options?: StringOptions) => PgAttr<PgAttr<_sinclair_typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
1395
4528
|
/**
|
|
1396
|
-
*
|
|
1397
|
-
* @param options
|
|
4529
|
+
* Creates a column Updated At. Like createdAt, but it is updated on every update of the row.
|
|
1398
4530
|
*/
|
|
1399
4531
|
readonly updatedAt: (options?: StringOptions) => PgAttr<PgAttr<_sinclair_typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
1400
4532
|
/**
|
|
1401
|
-
*
|
|
1402
|
-
* @param properties
|
|
1403
|
-
* @param options
|
|
4533
|
+
* @deprecated Build your own entity schema.
|
|
1404
4534
|
*/
|
|
1405
4535
|
readonly entity: <T extends TProperties>(properties: T, options?: ObjectOptions) => TEntity<T>;
|
|
1406
4536
|
/**
|
|
1407
|
-
*
|
|
1408
|
-
*
|
|
4537
|
+
* Creates an insert schema for a given object schema.
|
|
4538
|
+
* - pg.default will be optional
|
|
1409
4539
|
*/
|
|
1410
4540
|
readonly insert: <T extends TObject>(obj: T) => TInsertObject<T>;
|
|
1411
4541
|
/**
|
|
@@ -1413,25 +4543,27 @@ declare class PostgresTypeProvider {
|
|
|
1413
4543
|
*/
|
|
1414
4544
|
readonly input: <T extends TObject>(obj: T) => TInsertObject<T>;
|
|
1415
4545
|
/**
|
|
1416
|
-
*
|
|
1417
|
-
* @param resource
|
|
1418
|
-
* @param options
|
|
4546
|
+
* Creates a page schema for a given object schema.
|
|
1419
4547
|
*/
|
|
1420
4548
|
readonly page: <T extends TObject>(resource: T, options?: ObjectOptions) => TPage<T>;
|
|
1421
4549
|
/**
|
|
1422
|
-
*
|
|
1423
|
-
* @param type
|
|
1424
|
-
* @param ref
|
|
1425
|
-
* @param actions
|
|
4550
|
+
* Creates a reference to another table or schema.
|
|
1426
4551
|
*/
|
|
1427
4552
|
readonly ref: <T extends TSchema>(type: T, ref: () => any, actions?: {
|
|
1428
4553
|
onUpdate?: UpdateDeleteAction$1;
|
|
1429
4554
|
onDelete?: UpdateDeleteAction$1;
|
|
1430
4555
|
}) => PgAttr<T, PgRef>;
|
|
1431
4556
|
/**
|
|
4557
|
+
* @alias ref
|
|
4558
|
+
*/
|
|
4559
|
+
references: <T extends TSchema>(type: T, ref: () => any, actions?: {
|
|
4560
|
+
onUpdate?: UpdateDeleteAction$1;
|
|
4561
|
+
onDelete?: UpdateDeleteAction$1;
|
|
4562
|
+
}) => PgAttr<T, PgRef>;
|
|
4563
|
+
/**
|
|
4564
|
+
* Creates a reference to another table or schema with a foreign key.
|
|
1432
4565
|
*
|
|
1433
|
-
* @
|
|
1434
|
-
* @param foreignKey
|
|
4566
|
+
* @experimental
|
|
1435
4567
|
*/
|
|
1436
4568
|
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>;
|
|
1437
4569
|
}
|
|
@@ -1440,7 +4572,7 @@ declare const pg: PostgresTypeProvider;
|
|
|
1440
4572
|
/**
|
|
1441
4573
|
* Postgres schema type.
|
|
1442
4574
|
*/
|
|
1443
|
-
declare const schema: <TDocument extends TSchema>(name: string, document: TDocument) =>
|
|
4575
|
+
declare const schema: <TDocument extends TSchema>(name: string, document: TDocument) => drizzle_orm.$Type<drizzle_orm_pg_core.PgCustomColumnBuilder<{
|
|
1444
4576
|
name: string;
|
|
1445
4577
|
dataType: "custom";
|
|
1446
4578
|
columnType: "PgCustomColumn";
|
|
@@ -1453,176 +4585,6 @@ declare const schema: <TDocument extends TSchema>(name: string, document: TDocum
|
|
|
1453
4585
|
params: [];
|
|
1454
4586
|
})["static"]>;
|
|
1455
4587
|
|
|
1456
|
-
declare const dzl: {
|
|
1457
|
-
pg: typeof drizzle_orm_pg_core;
|
|
1458
|
-
aliasedTable<T extends drizzleOrm.Table | drizzleOrm.View>(table: T, tableAlias: string): T;
|
|
1459
|
-
aliasedRelation<T extends drizzleOrm.Relation>(relation: T, tableAlias: string): T;
|
|
1460
|
-
aliasedTableColumn<T extends drizzleOrm.AnyColumn>(column: T, tableAlias: string): T;
|
|
1461
|
-
mapColumnsInAliasedSQLToAlias(query: drizzleOrm.SQL.Aliased, alias: string): drizzleOrm.SQL.Aliased;
|
|
1462
|
-
mapColumnsInSQLToAlias(query: drizzleOrm.SQL, alias: string): drizzleOrm.SQL;
|
|
1463
|
-
ColumnAliasProxyHandler: typeof drizzleOrm.ColumnAliasProxyHandler;
|
|
1464
|
-
TableAliasProxyHandler: typeof drizzleOrm.TableAliasProxyHandler;
|
|
1465
|
-
RelationTableAliasProxyHandler: typeof drizzleOrm.RelationTableAliasProxyHandler;
|
|
1466
|
-
ColumnBuilder: typeof drizzleOrm.ColumnBuilder;
|
|
1467
|
-
Column: typeof drizzleOrm.Column;
|
|
1468
|
-
is<T extends drizzleOrm.DrizzleEntityClass<any>>(value: any, type: T): value is InstanceType<T>;
|
|
1469
|
-
entityKind: typeof drizzleOrm.entityKind;
|
|
1470
|
-
hasOwnEntityKind: typeof drizzleOrm.hasOwnEntityKind;
|
|
1471
|
-
DrizzleError: typeof drizzleOrm.DrizzleError;
|
|
1472
|
-
TransactionRollbackError: typeof drizzleOrm.TransactionRollbackError;
|
|
1473
|
-
ConsoleLogWriter: typeof drizzleOrm.ConsoleLogWriter;
|
|
1474
|
-
DefaultLogger: typeof drizzleOrm.DefaultLogger;
|
|
1475
|
-
NoopLogger: typeof drizzleOrm.NoopLogger;
|
|
1476
|
-
QueryPromise: typeof drizzleOrm.QueryPromise;
|
|
1477
|
-
getOperators(): {
|
|
1478
|
-
and: typeof drizzleOrm.and;
|
|
1479
|
-
between: typeof drizzleOrm.between;
|
|
1480
|
-
eq: drizzleOrm.BinaryOperator;
|
|
1481
|
-
exists: typeof drizzleOrm.exists;
|
|
1482
|
-
gt: drizzleOrm.BinaryOperator;
|
|
1483
|
-
gte: drizzleOrm.BinaryOperator;
|
|
1484
|
-
ilike: typeof drizzleOrm.ilike;
|
|
1485
|
-
inArray: typeof drizzleOrm.inArray;
|
|
1486
|
-
isNull: typeof drizzleOrm.isNull;
|
|
1487
|
-
isNotNull: typeof drizzleOrm.isNotNull;
|
|
1488
|
-
like: typeof drizzleOrm.like;
|
|
1489
|
-
lt: drizzleOrm.BinaryOperator;
|
|
1490
|
-
lte: drizzleOrm.BinaryOperator;
|
|
1491
|
-
ne: drizzleOrm.BinaryOperator;
|
|
1492
|
-
not: typeof drizzleOrm.not;
|
|
1493
|
-
notBetween: typeof drizzleOrm.notBetween;
|
|
1494
|
-
notExists: typeof drizzleOrm.notExists;
|
|
1495
|
-
notLike: typeof drizzleOrm.notLike;
|
|
1496
|
-
notIlike: typeof drizzleOrm.notIlike;
|
|
1497
|
-
notInArray: typeof drizzleOrm.notInArray;
|
|
1498
|
-
or: typeof drizzleOrm.or;
|
|
1499
|
-
sql: typeof drizzleOrm.sql;
|
|
1500
|
-
};
|
|
1501
|
-
getOrderByOperators(): {
|
|
1502
|
-
sql: typeof drizzleOrm.sql;
|
|
1503
|
-
asc: typeof drizzleOrm.asc;
|
|
1504
|
-
desc: typeof drizzleOrm.desc;
|
|
1505
|
-
};
|
|
1506
|
-
extractTablesRelationalConfig<TTables extends drizzleOrm.TablesRelationalConfig>(schema: Record<string, unknown>, configHelpers: (table: drizzleOrm.Table) => any): {
|
|
1507
|
-
tables: TTables;
|
|
1508
|
-
tableNamesMap: Record<string, string>;
|
|
1509
|
-
};
|
|
1510
|
-
relations<TTableName extends string, TRelations extends Record<string, drizzleOrm.Relation<any>>>(table: drizzleOrm.AnyTable<{
|
|
1511
|
-
name: TTableName;
|
|
1512
|
-
}>, relations: (helpers: drizzleOrm.TableRelationsHelpers<TTableName>) => TRelations): drizzleOrm.Relations<TTableName, TRelations>;
|
|
1513
|
-
createOne<TTableName extends string>(sourceTable: drizzleOrm.Table): <TForeignTable extends drizzleOrm.Table, TColumns extends [drizzleOrm.AnyColumn<{
|
|
1514
|
-
tableName: TTableName;
|
|
1515
|
-
}>, ...drizzleOrm.AnyColumn<{
|
|
1516
|
-
tableName: TTableName;
|
|
1517
|
-
}>[]]>(table: TForeignTable, config?: drizzleOrm.RelationConfig<TTableName, TForeignTable["_"]["name"], TColumns>) => drizzleOrm.One<TForeignTable["_"]["name"], drizzleOrm.Equal<TColumns[number]["_"]["notNull"], true>>;
|
|
1518
|
-
createMany(sourceTable: drizzleOrm.Table): <TForeignTable extends drizzleOrm.Table>(referencedTable: TForeignTable, config?: {
|
|
1519
|
-
relationName: string;
|
|
1520
|
-
}) => drizzleOrm.Many<TForeignTable["_"]["name"]>;
|
|
1521
|
-
normalizeRelation(schema: drizzleOrm.TablesRelationalConfig, tableNamesMap: Record<string, string>, relation: drizzleOrm.Relation): drizzleOrm.NormalizedRelation;
|
|
1522
|
-
createTableRelationsHelpers<TTableName extends string>(sourceTable: drizzleOrm.AnyTable<{
|
|
1523
|
-
name: TTableName;
|
|
1524
|
-
}>): {
|
|
1525
|
-
one: <TForeignTable extends drizzleOrm.Table, TColumns extends [drizzleOrm.AnyColumn<{
|
|
1526
|
-
tableName: TTableName;
|
|
1527
|
-
}>, ...drizzleOrm.AnyColumn<{
|
|
1528
|
-
tableName: TTableName;
|
|
1529
|
-
}>[]]>(table: TForeignTable, config?: drizzleOrm.RelationConfig<TTableName, TForeignTable["_"]["name"], TColumns> | undefined) => drizzleOrm.One<TForeignTable["_"]["name"], drizzleOrm.Equal<TColumns[number]["_"]["notNull"], true>>;
|
|
1530
|
-
many: <TForeignTable extends drizzleOrm.Table>(referencedTable: TForeignTable, config?: {
|
|
1531
|
-
relationName: string;
|
|
1532
|
-
}) => drizzleOrm.Many<TForeignTable["_"]["name"]>;
|
|
1533
|
-
};
|
|
1534
|
-
mapRelationalRow(tablesConfig: drizzleOrm.TablesRelationalConfig, tableConfig: drizzleOrm.TableRelationalConfig, row: unknown[], buildQueryResultSelection: drizzleOrm.BuildRelationalQueryResult["selection"], mapColumnValue?: (value: unknown) => unknown): Record<string, unknown>;
|
|
1535
|
-
Relation: typeof drizzleOrm.Relation;
|
|
1536
|
-
Relations: typeof drizzleOrm.Relations;
|
|
1537
|
-
One: typeof drizzleOrm.One;
|
|
1538
|
-
Many: typeof drizzleOrm.Many;
|
|
1539
|
-
bindIfParam(value: unknown, column: drizzleOrm.SQLWrapper): drizzleOrm.SQLChunk;
|
|
1540
|
-
and(...conditions: (drizzleOrm.SQLWrapper | undefined)[]): drizzleOrm.SQL | undefined;
|
|
1541
|
-
or(...conditions: (drizzleOrm.SQLWrapper | undefined)[]): drizzleOrm.SQL | undefined;
|
|
1542
|
-
not(condition: drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1543
|
-
inArray<T>(column: drizzleOrm.SQL.Aliased<T>, values: (T | drizzleOrm.Placeholder)[] | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1544
|
-
inArray<TColumn extends drizzleOrm.Column>(column: TColumn, values: ReadonlyArray<drizzleOrm.GetColumnData<TColumn, "raw"> | drizzleOrm.Placeholder> | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1545
|
-
inArray<T extends drizzleOrm.SQLWrapper>(column: Exclude<T, drizzleOrm.SQL.Aliased | drizzleOrm.Column>, values: ReadonlyArray<unknown | drizzleOrm.Placeholder> | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1546
|
-
notInArray<T>(column: drizzleOrm.SQL.Aliased<T>, values: (T | drizzleOrm.Placeholder)[] | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1547
|
-
notInArray<TColumn extends drizzleOrm.Column>(column: TColumn, values: (drizzleOrm.GetColumnData<TColumn, "raw"> | drizzleOrm.Placeholder)[] | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1548
|
-
notInArray<T extends drizzleOrm.SQLWrapper>(column: Exclude<T, drizzleOrm.SQL.Aliased | drizzleOrm.Column>, values: (unknown | drizzleOrm.Placeholder)[] | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1549
|
-
isNull(value: drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1550
|
-
isNotNull(value: drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1551
|
-
exists(subquery: drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1552
|
-
notExists(subquery: drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1553
|
-
between<T>(column: drizzleOrm.SQL.Aliased, min: T | drizzleOrm.SQLWrapper, max: T | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1554
|
-
between<TColumn extends drizzleOrm.AnyColumn>(column: TColumn, min: drizzleOrm.GetColumnData<TColumn, "raw"> | drizzleOrm.SQLWrapper, max: drizzleOrm.GetColumnData<TColumn, "raw"> | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1555
|
-
between<T extends drizzleOrm.SQLWrapper>(column: Exclude<T, drizzleOrm.SQL.Aliased | drizzleOrm.Column>, min: unknown, max: unknown): drizzleOrm.SQL;
|
|
1556
|
-
notBetween<T>(column: drizzleOrm.SQL.Aliased, min: T | drizzleOrm.SQLWrapper, max: T | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1557
|
-
notBetween<TColumn extends drizzleOrm.AnyColumn>(column: TColumn, min: drizzleOrm.GetColumnData<TColumn, "raw"> | drizzleOrm.SQLWrapper, max: drizzleOrm.GetColumnData<TColumn, "raw"> | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1558
|
-
notBetween<T extends drizzleOrm.SQLWrapper>(column: Exclude<T, drizzleOrm.SQL.Aliased | drizzleOrm.Column>, min: unknown, max: unknown): drizzleOrm.SQL;
|
|
1559
|
-
like(column: drizzleOrm.Column | drizzleOrm.SQL.Aliased | drizzleOrm.SQL, value: string | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1560
|
-
notLike(column: drizzleOrm.Column | drizzleOrm.SQL.Aliased | drizzleOrm.SQL, value: string | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1561
|
-
ilike(column: drizzleOrm.Column | drizzleOrm.SQL.Aliased | drizzleOrm.SQL, value: string | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1562
|
-
notIlike(column: drizzleOrm.Column | drizzleOrm.SQL.Aliased | drizzleOrm.SQL, value: string | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1563
|
-
arrayContains<T>(column: drizzleOrm.SQL.Aliased<T>, values: (T | drizzleOrm.Placeholder) | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1564
|
-
arrayContains<TColumn extends drizzleOrm.Column>(column: TColumn, values: (drizzleOrm.GetColumnData<TColumn, "raw"> | drizzleOrm.Placeholder) | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1565
|
-
arrayContains<T extends drizzleOrm.SQLWrapper>(column: Exclude<T, drizzleOrm.SQL.Aliased | drizzleOrm.Column>, values: (unknown | drizzleOrm.Placeholder)[] | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1566
|
-
arrayContained<T>(column: drizzleOrm.SQL.Aliased<T>, values: (T | drizzleOrm.Placeholder) | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1567
|
-
arrayContained<TColumn extends drizzleOrm.Column>(column: TColumn, values: (drizzleOrm.GetColumnData<TColumn, "raw"> | drizzleOrm.Placeholder) | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1568
|
-
arrayContained<T extends drizzleOrm.SQLWrapper>(column: Exclude<T, drizzleOrm.SQL.Aliased | drizzleOrm.Column>, values: (unknown | drizzleOrm.Placeholder)[] | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1569
|
-
arrayOverlaps<T>(column: drizzleOrm.SQL.Aliased<T>, values: (T | drizzleOrm.Placeholder) | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1570
|
-
arrayOverlaps<TColumn extends drizzleOrm.Column>(column: TColumn, values: (drizzleOrm.GetColumnData<TColumn, "raw"> | drizzleOrm.Placeholder) | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1571
|
-
arrayOverlaps<T extends drizzleOrm.SQLWrapper>(column: Exclude<T, drizzleOrm.SQL.Aliased | drizzleOrm.Column>, values: (unknown | drizzleOrm.Placeholder)[] | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1572
|
-
eq: drizzleOrm.BinaryOperator;
|
|
1573
|
-
ne: drizzleOrm.BinaryOperator;
|
|
1574
|
-
gt: drizzleOrm.BinaryOperator;
|
|
1575
|
-
gte: drizzleOrm.BinaryOperator;
|
|
1576
|
-
lt: drizzleOrm.BinaryOperator;
|
|
1577
|
-
lte: drizzleOrm.BinaryOperator;
|
|
1578
|
-
asc(column: drizzleOrm.AnyColumn | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1579
|
-
desc(column: drizzleOrm.AnyColumn | drizzleOrm.SQLWrapper): drizzleOrm.SQL;
|
|
1580
|
-
count(expression?: drizzleOrm.SQLWrapper): drizzleOrm.SQL<number>;
|
|
1581
|
-
countDistinct(expression: drizzleOrm.SQLWrapper): drizzleOrm.SQL<number>;
|
|
1582
|
-
avg(expression: drizzleOrm.SQLWrapper): drizzleOrm.SQL<string | null>;
|
|
1583
|
-
avgDistinct(expression: drizzleOrm.SQLWrapper): drizzleOrm.SQL<string | null>;
|
|
1584
|
-
sum(expression: drizzleOrm.SQLWrapper): drizzleOrm.SQL<string | null>;
|
|
1585
|
-
sumDistinct(expression: drizzleOrm.SQLWrapper): drizzleOrm.SQL<string | null>;
|
|
1586
|
-
max<T extends drizzleOrm.SQLWrapper>(expression: T): drizzleOrm.SQL<(T extends drizzleOrm.AnyColumn ? T["_"]["data"] : string) | null>;
|
|
1587
|
-
min<T extends drizzleOrm.SQLWrapper>(expression: T): drizzleOrm.SQL<(T extends drizzleOrm.AnyColumn ? T["_"]["data"] : string) | null>;
|
|
1588
|
-
l2Distance(column: drizzleOrm.SQLWrapper | drizzleOrm.AnyColumn, value: number[] | string[] | drizzle_orm_query_builders_query_builder.TypedQueryBuilder<any> | string): drizzleOrm.SQL;
|
|
1589
|
-
l1Distance(column: drizzleOrm.SQLWrapper | drizzleOrm.AnyColumn, value: number[] | string[] | drizzle_orm_query_builders_query_builder.TypedQueryBuilder<any> | string): drizzleOrm.SQL;
|
|
1590
|
-
innerProduct(column: drizzleOrm.SQLWrapper | drizzleOrm.AnyColumn, value: number[] | string[] | drizzle_orm_query_builders_query_builder.TypedQueryBuilder<any> | string): drizzleOrm.SQL;
|
|
1591
|
-
cosineDistance(column: drizzleOrm.SQLWrapper | drizzleOrm.AnyColumn, value: number[] | string[] | drizzle_orm_query_builders_query_builder.TypedQueryBuilder<any> | string): drizzleOrm.SQL;
|
|
1592
|
-
hammingDistance(column: drizzleOrm.SQLWrapper | drizzleOrm.AnyColumn, value: number[] | string[] | drizzle_orm_query_builders_query_builder.TypedQueryBuilder<any> | string): drizzleOrm.SQL;
|
|
1593
|
-
jaccardDistance(column: drizzleOrm.SQLWrapper | drizzleOrm.AnyColumn, value: number[] | string[] | drizzle_orm_query_builders_query_builder.TypedQueryBuilder<any> | string): drizzleOrm.SQL;
|
|
1594
|
-
isSQLWrapper(value: unknown): value is drizzleOrm.SQLWrapper;
|
|
1595
|
-
name(value: string): drizzleOrm.Name;
|
|
1596
|
-
isDriverValueEncoder(value: unknown): value is drizzleOrm.DriverValueEncoder<any, any>;
|
|
1597
|
-
param<TData, TDriver>(value: TData, encoder?: drizzleOrm.DriverValueEncoder<TData, TDriver>): drizzleOrm.Param<TData, TDriver>;
|
|
1598
|
-
sql: typeof drizzleOrm.sql;
|
|
1599
|
-
placeholder<TName extends string>(name: TName): drizzleOrm.Placeholder<TName>;
|
|
1600
|
-
fillPlaceholders(params: unknown[], values: Record<string, unknown>): unknown[];
|
|
1601
|
-
isView(view: unknown): view is drizzleOrm.View;
|
|
1602
|
-
getViewName<T extends drizzleOrm.View>(view: T): T["_"]["name"];
|
|
1603
|
-
FakePrimitiveParam: typeof drizzleOrm.FakePrimitiveParam;
|
|
1604
|
-
StringChunk: typeof drizzleOrm.StringChunk;
|
|
1605
|
-
SQL: typeof drizzleOrm.SQL;
|
|
1606
|
-
Name: typeof drizzleOrm.Name;
|
|
1607
|
-
noopDecoder: drizzleOrm.DriverValueDecoder<any, any>;
|
|
1608
|
-
noopEncoder: drizzleOrm.DriverValueEncoder<any, any>;
|
|
1609
|
-
noopMapper: drizzleOrm.DriverValueMapper<any, any>;
|
|
1610
|
-
Param: typeof drizzleOrm.Param;
|
|
1611
|
-
Placeholder: typeof drizzleOrm.Placeholder;
|
|
1612
|
-
View: typeof drizzleOrm.View;
|
|
1613
|
-
Subquery: typeof drizzleOrm.Subquery;
|
|
1614
|
-
WithSubquery: typeof drizzleOrm.WithSubquery;
|
|
1615
|
-
isTable(table: unknown): table is drizzleOrm.Table;
|
|
1616
|
-
getTableName<T extends drizzleOrm.Table>(table: T): T["_"]["name"];
|
|
1617
|
-
getTableUniqueName<T extends drizzleOrm.Table>(table: T): `${T["_"]["schema"]}.${T["_"]["name"]}`;
|
|
1618
|
-
Table: typeof drizzleOrm.Table;
|
|
1619
|
-
haveSameKeys(left: Record<string, unknown>, right: Record<string, unknown>): boolean;
|
|
1620
|
-
getTableColumns<T extends drizzleOrm.Table>(table: T): T["_"]["columns"];
|
|
1621
|
-
getViewSelectedFields<T extends drizzleOrm.View>(view: T): T["_"]["selectedFields"];
|
|
1622
|
-
isConfig(data: any): boolean;
|
|
1623
|
-
ViewBaseConfig: typeof drizzleOrm.ViewBaseConfig;
|
|
1624
|
-
};
|
|
1625
|
-
|
|
1626
4588
|
declare const envSchema: _alepha_core.TObject<{
|
|
1627
4589
|
POSTGRES_PROVIDER: _sinclair_typebox.TOptional<_sinclair_typebox.TUnsafe<"pg">>;
|
|
1628
4590
|
}>;
|
|
@@ -1639,4 +4601,4 @@ declare class PostgresModule {
|
|
|
1639
4601
|
protected getDefaultProviderName(): "pg";
|
|
1640
4602
|
}
|
|
1641
4603
|
|
|
1642
|
-
export { $entity, $repository, $sequence, $transaction, type BaseEntity, type BaseEntityKeys, 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 TPage, type TransactionContext, type TransactionDescriptorOptions,
|
|
4604
|
+
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 };
|