@duckdbfan/drizzle-duckdb 0.0.5 → 0.0.6

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,3 +1,4 @@
1
1
  export * from './driver.ts';
2
2
  export * from './session.ts';
3
3
  export * from './columns.ts';
4
+ export * from './migrator.ts';
package/dist/index.mjs CHANGED
@@ -418,7 +418,14 @@ class DuckDBSelectBuilder extends PgSelectBuilder {
418
418
  });
419
419
  }
420
420
  }
421
+ // src/migrator.ts
422
+ import { readMigrationFiles } from "drizzle-orm/migrator";
423
+ async function migrate(db, config) {
424
+ const migrations = readMigrationFiles(config);
425
+ await db.dialect.migrate(migrations, db.session, config);
426
+ }
421
427
  export {
428
+ migrate,
422
429
  drizzle,
423
430
  DuckDBTransaction,
424
431
  DuckDBSession,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "module": "index.ts",
4
4
  "main": "dist/index.mjs",
5
5
  "types": "dist/index.d.ts",
6
- "version": "0.0.5",
6
+ "version": "0.0.6",
7
7
  "description": "A drizzle ORM client for use with DuckDB. Based on drizzle's Postgres client.",
8
8
  "type": "module",
9
9
  "scripts": {
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './driver.ts';
2
2
  export * from './session.ts';
3
- export * from './columns.ts';
3
+ export * from './columns.ts';
4
+ export * from './migrator.ts';