rake-db 2.3.0 → 2.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # rake-db
2
2
 
3
+ ## 2.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Add command for pulling database structure into a migration
8
+ - Updated dependencies
9
+ - pqb@0.9.1
10
+
3
11
  ## 2.3.0
4
12
 
5
13
  ### Minor Changes
package/db.ts CHANGED
@@ -4,7 +4,7 @@ import { rakeDb } from './src/rakeDb';
4
4
  import { AdapterOptions } from 'pqb';
5
5
  import { appCodeUpdater } from '../orm/src';
6
6
 
7
- config({ path: path.resolve(process.cwd(), '.env.local') });
7
+ config({ path: path.resolve('.env.local') });
8
8
  config();
9
9
 
10
10
  const options: AdapterOptions[] = [];
@@ -22,7 +22,7 @@ if (databaseURLTest) {
22
22
  }
23
23
 
24
24
  rakeDb(options, {
25
- migrationsPath: path.resolve(process.cwd(), 'migrations'),
25
+ migrationsPath: 'migrations',
26
26
  appCodeUpdater: appCodeUpdater({
27
27
  tablePath: (tableName) => `app/tables/${tableName}.ts`,
28
28
  baseTablePath: 'app/lib/baseTable.ts',
package/dist/index.d.ts CHANGED
@@ -204,6 +204,7 @@ declare const createDb: (arg: MaybeArray<AdapterOptions>, config: RakeDbConfig)
204
204
  declare const dropDb: (arg: MaybeArray<AdapterOptions>) => Promise<void>;
205
205
  declare const resetDb: (arg: MaybeArray<AdapterOptions>, config: RakeDbConfig) => Promise<void>;
206
206
 
207
+ declare const writeMigrationFile: (config: RakeDbConfig, name: string, content: string) => Promise<void>;
207
208
  declare const generate: (config: RakeDbConfig, args: string[]) => Promise<void>;
208
209
 
209
210
  declare const migrate: (options: MaybeArray<AdapterOptions>, config: RakeDbConfig, args?: string[]) => Promise<void>;
@@ -214,4 +215,4 @@ declare const change: (fn: ChangeCallback) => void;
214
215
 
215
216
  declare const rakeDb: (options: MaybeArray<AdapterOptions>, partialConfig?: Partial<RakeDbConfig>, args?: string[]) => Promise<void>;
216
217
 
217
- export { AppCodeUpdater, ChangeTableCallback, ChangeTableOptions, ColumnComment, ColumnsShapeCallback, DropMode, ExtensionOptions, JoinTableOptions, Migration, MigrationColumnTypes, RakeDbAst, RakeDbConfig, TableOptions, change, createDb, dropDb, generate, migrate, rakeDb, resetDb, rollback, runCodeUpdater };
218
+ export { AppCodeUpdater, ChangeTableCallback, ChangeTableOptions, ColumnComment, ColumnsShapeCallback, DropMode, ExtensionOptions, JoinTableOptions, Migration, MigrationColumnTypes, RakeDbAst, RakeDbConfig, TableOptions, change, createDb, dropDb, generate, migrate, rakeDb, resetDb, rollback, runCodeUpdater, writeMigrationFile };