@authhero/kysely-adapter 12.9.0 → 12.11.0

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 CHANGED
@@ -12,13 +12,21 @@ npm install @authhero/kysely-adapter
12
12
 
13
13
  ```typescript
14
14
  import { Kysely } from "kysely";
15
- import { createAdapters, migrateToLatest } from "@authhero/kysely-adapter";
15
+ import {
16
+ createAdapters,
17
+ formatMigrationPlan,
18
+ migrateToLatest,
19
+ planMigrations,
20
+ } from "@authhero/kysely-adapter";
16
21
 
17
22
  // Create your Kysely instance with your preferred dialect
18
23
  const db = new Kysely<Database>({
19
24
  dialect: yourDialect,
20
25
  });
21
26
 
27
+ // Preview pending migrations without applying them (optional)
28
+ console.log(formatMigrationPlan(await planMigrations(db)));
29
+
22
30
  // Run migrations
23
31
  await migrateToLatest(db);
24
32