rake-db 2.0.0 → 2.0.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 CHANGED
@@ -1,4 +1,4 @@
1
- import { MaybeArray, AdapterOptions, ColumnTypes, EmptyObject, RawExpression, ColumnType, TransactionAdapter, IndexColumnOptions, IndexOptions, ForeignKeyOptions, ColumnsShape } from 'pqb';
1
+ import { MaybeArray, AdapterOptions, ColumnTypes, EmptyObject, RawExpression, ColumnType, ColumnsShape, IndexColumnOptions, IndexOptions, TransactionAdapter, ForeignKeyOptions } from 'pqb';
2
2
 
3
3
  declare type MigrationConfig = {
4
4
  migrationsPath: string;
@@ -9,6 +9,8 @@ declare type MigrationConfig = {
9
9
  declare const createDb: (arg: MaybeArray<AdapterOptions>, config: MigrationConfig) => Promise<void>;
10
10
  declare const dropDb: (arg: MaybeArray<AdapterOptions>) => Promise<void>;
11
11
 
12
+ declare const generate: (config: MigrationConfig, args: string[]) => Promise<void>;
13
+
12
14
  declare function add(item: ColumnType, options?: {
13
15
  dropMode?: DropMode;
14
16
  }): ChangeItem;
@@ -52,6 +54,14 @@ declare type ChangeTableOptions = {
52
54
  comment?: string | [string, string] | null;
53
55
  };
54
56
  declare type ChangeTableCallback = (t: TableChanger) => TableChangeData;
57
+ declare type ColumnIndex = {
58
+ columns: IndexColumnOptions[];
59
+ options: IndexOptions;
60
+ };
61
+ declare type ColumnComment = {
62
+ column: string;
63
+ comment: string | null;
64
+ };
55
65
  declare type JoinTableOptions = {
56
66
  tableName?: string;
57
67
  comment?: string;
@@ -91,4 +101,4 @@ declare class Migration extends TransactionAdapter {
91
101
 
92
102
  declare const change: (fn: (db: Migration, up: boolean) => Promise<void>) => void;
93
103
 
94
- export { change, createDb, dropDb };
104
+ export { ChangeTableCallback, ChangeTableOptions, ColumnComment, ColumnIndex, ColumnsShapeCallback, DropMode, JoinTableOptions, Migration, TableOptions, change, createDb, dropDb, generate };