rake-db 2.20.29 → 2.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +4 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as orchid_core from 'orchid-core';
|
|
2
2
|
import { MaybeArray, RawSQLBase, ColumnDataCheckBase, RecordString, EmptyObject, ColumnSchemaConfig, MaybePromise, RecordOptionalString, ColumnTypeBase, ForeignKeyTable, SingleSql } from 'orchid-core';
|
|
3
3
|
import * as pqb from 'pqb';
|
|
4
|
-
import { TableData, ColumnsShape, NoPrimaryKeyOption, ColumnType, EnumColumn, raw, Adapter, DbResult, TransactionAdapter, QueryLogObject, TableDataFn, TableDataItem, DbDomainArg,
|
|
4
|
+
import { TableData, ColumnsShape, NoPrimaryKeyOption, ColumnType, EnumColumn, raw, Adapter, DbResult, TransactionAdapter, QueryLogObject, TableDataFn, TableDataItem, DbDomainArg, Db as Db$1, QueryArraysResult, AdapterOptions, DefaultColumnTypes, DefaultSchemaConfig, QueryLogOptions, SearchWeight, ColumnsByType } from 'pqb';
|
|
5
5
|
|
|
6
6
|
type RakeDbAst = RakeDbAst.Table | RakeDbAst.ChangeTable | RakeDbAst.RenameType | RakeDbAst.Schema | RakeDbAst.RenameSchema | RakeDbAst.Extension | RakeDbAst.Enum | RakeDbAst.EnumValues | RakeDbAst.RenameEnumValues | RakeDbAst.ChangeEnumValues | RakeDbAst.Domain | RakeDbAst.Collation | RakeDbAst.Constraint | RakeDbAst.RenameTableItem | RakeDbAst.View;
|
|
7
7
|
declare namespace RakeDbAst {
|
|
@@ -216,10 +216,12 @@ declare const tableChangeMethods: {
|
|
|
216
216
|
comment(comment: string | null): Change;
|
|
217
217
|
rename(name: string): RakeDbAst.ChangeTableItem.Rename;
|
|
218
218
|
primaryKey<Columns extends [string, ...string[]], Name extends string>(columns: Columns, name?: Name | undefined): {
|
|
219
|
+
tableDataItem: true;
|
|
219
220
|
columns: Columns;
|
|
220
221
|
name: string extends Name ? never : Name;
|
|
221
222
|
};
|
|
222
223
|
unique<Columns_1 extends [string | TableData.Index.ColumnOrExpressionOptions<string>, ...(string | TableData.Index.ColumnOrExpressionOptions<string>)[]], Name_1 extends string>(columns: Columns_1, ...args: [options?: TableData.Index.UniqueOptionsArg | undefined] | [name?: Name_1 | undefined, options?: TableData.Index.UniqueOptionsArg | undefined]): {
|
|
224
|
+
tableDataItem: true;
|
|
223
225
|
columns: Columns_1 extends (string | TableData.Index.ColumnOptionsForColumn<string>)[] ? { [I in keyof Columns_1]: "column" extends keyof Columns_1[I] ? Columns_1[I][keyof Columns_1[I] & "column"] : Columns_1[I]; } : never;
|
|
224
226
|
name: string extends Name_1 ? never : Name_1;
|
|
225
227
|
};
|
|
@@ -243,10 +245,7 @@ type TableOptions = {
|
|
|
243
245
|
snakeCase?: boolean;
|
|
244
246
|
language?: string;
|
|
245
247
|
};
|
|
246
|
-
type
|
|
247
|
-
type MigrationColumnTypes<CT> = Omit<CT, 'text' | 'citext' | 'enum'> & {
|
|
248
|
-
text: TextColumnCreator;
|
|
249
|
-
citext: TextColumnCreator;
|
|
248
|
+
type MigrationColumnTypes<CT> = Omit<CT, 'enum'> & {
|
|
250
249
|
enum: (name: string) => EnumColumn<ColumnSchemaConfig, unknown>;
|
|
251
250
|
};
|
|
252
251
|
type ColumnsShapeCallback<CT, Shape extends ColumnsShape = ColumnsShape> = (t: MigrationColumnTypes<CT> & {
|