@nextlyhq/adapter-drizzle 0.0.2-alpha.7 → 0.0.2-alpha.71

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.
Files changed (64) hide show
  1. package/README.md +25 -1
  2. package/dist/adapter-BypoOEEN.d.cts +1166 -0
  3. package/dist/adapter-CSP-Ek-L.d.ts +1166 -0
  4. package/dist/index-BYb6cDli.d.ts +1168 -0
  5. package/dist/index-C4HJsfwA.d.cts +1168 -0
  6. package/dist/index.cjs +2302 -1085
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.d.cts +5 -9
  9. package/dist/index.d.ts +5 -9
  10. package/dist/index.mjs +2301 -1083
  11. package/dist/index.mjs.map +1 -1
  12. package/dist/migrations.cjs +345 -146
  13. package/dist/migrations.cjs.map +1 -1
  14. package/dist/migrations.d.cts +93 -109
  15. package/dist/migrations.d.ts +93 -109
  16. package/dist/migrations.mjs +344 -144
  17. package/dist/migrations.mjs.map +1 -1
  18. package/dist/schema/index.cjs +21 -6
  19. package/dist/schema/index.cjs.map +1 -1
  20. package/dist/schema/index.d.cts +5 -116
  21. package/dist/schema/index.d.ts +5 -116
  22. package/dist/schema/index.mjs +20 -4
  23. package/dist/schema/index.mjs.map +1 -1
  24. package/dist/schema-Bkkr3JMC.d.cts +264 -0
  25. package/dist/schema-Bkkr3JMC.d.ts +264 -0
  26. package/dist/schema-name.cjs +42 -0
  27. package/dist/schema-name.cjs.map +1 -0
  28. package/dist/schema-name.d.cts +12 -0
  29. package/dist/schema-name.d.ts +12 -0
  30. package/dist/schema-name.mjs +40 -0
  31. package/dist/schema-name.mjs.map +1 -0
  32. package/dist/text-match.cjs +50 -0
  33. package/dist/text-match.cjs.map +1 -0
  34. package/dist/text-match.d.cts +32 -0
  35. package/dist/text-match.d.ts +32 -0
  36. package/dist/text-match.mjs +48 -0
  37. package/dist/text-match.mjs.map +1 -0
  38. package/dist/types/index.cjs +8 -24
  39. package/dist/types/index.d.cts +3 -210
  40. package/dist/types/index.d.ts +3 -210
  41. package/dist/types/index.mjs +1 -21
  42. package/dist/types-CNyA1oIm.cjs +185 -0
  43. package/dist/types-CNyA1oIm.cjs.map +1 -0
  44. package/dist/types-CaF_5jNk.mjs +150 -0
  45. package/dist/types-CaF_5jNk.mjs.map +1 -0
  46. package/dist/version-check.cjs +119 -127
  47. package/dist/version-check.cjs.map +1 -1
  48. package/dist/version-check.d.cts +54 -39
  49. package/dist/version-check.d.ts +54 -39
  50. package/dist/version-check.mjs +117 -125
  51. package/dist/version-check.mjs.map +1 -1
  52. package/package.json +23 -17
  53. package/dist/adapter-BxJVtttb.d.ts +0 -592
  54. package/dist/adapter-nvlxFkF-.d.cts +0 -592
  55. package/dist/core-CVO7WYDj.d.cts +0 -74
  56. package/dist/core-CVO7WYDj.d.ts +0 -74
  57. package/dist/error-um1d_3Uo.d.cts +0 -105
  58. package/dist/error-um1d_3Uo.d.ts +0 -105
  59. package/dist/migration-BbO5meEV.d.cts +0 -622
  60. package/dist/migration-Qe70wDOC.d.ts +0 -622
  61. package/dist/schema-BDn8WfSL.d.cts +0 -200
  62. package/dist/schema-BIQ0YQZ_.d.ts +0 -200
  63. package/dist/types/index.cjs.map +0 -1
  64. package/dist/types/index.mjs.map +0 -1
@@ -1,21 +1,5 @@
1
- import { D as DrizzleAdapter } from './adapter-nvlxFkF-.cjs';
2
- import { M as MigrationRecord, a as Migration, b as MigrationStatus, c as MigrationOptions } from './migration-BbO5meEV.cjs';
3
- export { d as MigrationResult } from './migration-BbO5meEV.cjs';
4
- import './core-CVO7WYDj.cjs';
5
- import './schema-BDn8WfSL.cjs';
6
- import './error-um1d_3Uo.cjs';
7
-
8
- /**
9
- * Database migration utilities.
10
- *
11
- * @remarks
12
- * Provides core utilities for migration management including checksum calculation,
13
- * sorting, filtering, and validation. Also includes optional helpers for adapters
14
- * to use for common migration operations.
15
- *
16
- * @packageDocumentation
17
- */
18
-
1
+ import { t as DrizzleAdapter } from "./adapter-BypoOEEN.cjs";
2
+ import { _ as MigrationOptions, b as MigrationStatus, g as Migration, v as MigrationRecord, y as MigrationResult } from "./index-C4HJsfwA.cjs";
19
3
  /**
20
4
  * Calculate SHA-256 checksum for a migration.
21
5
  *
@@ -42,7 +26,7 @@ import './error-um1d_3Uo.cjs';
42
26
  *
43
27
  * @public
44
28
  */
45
- declare function calculateChecksum(migration: Migration): string;
29
+ export declare function calculateChecksum(migration: Migration): string;
46
30
  /**
47
31
  * Sort migrations by timestamp in ascending order.
48
32
  *
@@ -67,7 +51,7 @@ declare function calculateChecksum(migration: Migration): string;
67
51
  *
68
52
  * @public
69
53
  */
70
- declare function sortMigrations(migrations: Migration[]): Migration[];
54
+ export declare function sortMigrations(migrations: Migration[]): Migration[];
71
55
  /**
72
56
  * Filter migrations to get only pending (unapplied) migrations.
73
57
  *
@@ -98,7 +82,7 @@ declare function sortMigrations(migrations: Migration[]): Migration[];
98
82
  *
99
83
  * @public
100
84
  */
101
- declare function filterPending(migrations: Migration[], applied: MigrationRecord[]): Migration[];
85
+ export declare function filterPending(migrations: Migration[], applied: MigrationRecord[]): Migration[];
102
86
  /**
103
87
  * Filter migration records to get only those that match given migrations.
104
88
  *
@@ -130,7 +114,7 @@ declare function filterPending(migrations: Migration[], applied: MigrationRecord
130
114
  *
131
115
  * @public
132
116
  */
133
- declare function filterApplied(migrations: Migration[], applied: MigrationRecord[]): MigrationRecord[];
117
+ export declare function filterApplied(migrations: Migration[], applied: MigrationRecord[]): MigrationRecord[];
134
118
  /**
135
119
  * Validate that a migration's checksum matches its applied record.
136
120
  *
@@ -158,7 +142,7 @@ declare function filterApplied(migrations: Migration[], applied: MigrationRecord
158
142
  *
159
143
  * @public
160
144
  */
161
- declare function validateChecksum(migration: Migration, record: MigrationRecord): boolean;
145
+ export declare function validateChecksum(migration: Migration, record: MigrationRecord): boolean;
162
146
  /**
163
147
  * Detect migrations that have been modified after being applied.
164
148
  *
@@ -185,7 +169,7 @@ declare function validateChecksum(migration: Migration, record: MigrationRecord)
185
169
  *
186
170
  * @public
187
171
  */
188
- declare function detectModified(migrations: Migration[], applied: MigrationRecord[]): MigrationRecord[];
172
+ export declare function detectModified(migrations: Migration[], applied: MigrationRecord[]): MigrationRecord[];
189
173
  /**
190
174
  * Get comprehensive migration status.
191
175
  *
@@ -206,23 +190,23 @@ declare function detectModified(migrations: Migration[], applied: MigrationRecor
206
190
  *
207
191
  * @public
208
192
  */
209
- declare function getMigrationStatus(migrations: Migration[], applied: MigrationRecord[]): MigrationStatus;
193
+ export declare function getMigrationStatus(migrations: Migration[], applied: MigrationRecord[]): MigrationStatus;
210
194
  /**
211
195
  * Validation result for migrations.
212
196
  *
213
197
  * @public
214
198
  */
215
- interface MigrationValidationResult {
216
- /** Whether all validations passed */
217
- valid: boolean;
218
- /** List of validation errors */
219
- errors: string[];
220
- /** List of validation warnings */
221
- warnings: string[];
222
- /** Migrations that have been modified */
223
- modified: MigrationRecord[];
224
- /** Duplicate migration IDs found */
225
- duplicates: string[];
199
+ export interface MigrationValidationResult {
200
+ /** Whether all validations passed */
201
+ valid: boolean;
202
+ /** List of validation errors */
203
+ errors: string[];
204
+ /** List of validation warnings */
205
+ warnings: string[];
206
+ /** Migrations that have been modified */
207
+ modified: MigrationRecord[];
208
+ /** Duplicate migration IDs found */
209
+ duplicates: string[];
226
210
  }
227
211
  /**
228
212
  * Validate migrations for common issues.
@@ -253,7 +237,7 @@ interface MigrationValidationResult {
253
237
  *
254
238
  * @public
255
239
  */
256
- declare function validateMigrations(migrations: Migration[], applied: MigrationRecord[], options?: MigrationOptions): MigrationValidationResult;
240
+ export declare function validateMigrations(migrations: Migration[], applied: MigrationRecord[], options?: MigrationOptions): MigrationValidationResult;
257
241
  /**
258
242
  * Helper functions for managing migrations in database adapters.
259
243
  *
@@ -266,75 +250,75 @@ declare function validateMigrations(migrations: Migration[], applied: MigrationR
266
250
  *
267
251
  * @public
268
252
  */
269
- interface MigrationHelpers {
270
- /**
271
- * Create the migrations tracking table if it doesn't exist.
272
- *
273
- * @remarks
274
- * Creates a table named `nextly_migrations` with columns:
275
- * - id (string, primary key)
276
- * - name (string)
277
- * - applied_at (timestamp)
278
- * - checksum (string, optional)
279
- *
280
- * Uses CREATE TABLE IF NOT EXISTS for safety.
281
- *
282
- * @param adapter - Database adapter to use
283
- * @returns Promise that resolves when table is created
284
- */
285
- createMigrationsTable(adapter: DrizzleAdapter): Promise<void>;
286
- /**
287
- * Get all applied migration records from the database.
288
- *
289
- * @remarks
290
- * Queries the `nextly_migrations` table and returns all records
291
- * sorted by applied_at descending (most recent first).
292
- *
293
- * @param adapter - Database adapter to use
294
- * @returns Promise with array of applied migration records
295
- */
296
- getAppliedMigrations(adapter: DrizzleAdapter): Promise<MigrationRecord[]>;
297
- /**
298
- * Record a migration as applied in the database.
299
- *
300
- * @remarks
301
- * Inserts a new record into the `nextly_migrations` table with:
302
- * - Migration ID, name
303
- * - Current timestamp for applied_at
304
- * - Calculated checksum
305
- *
306
- * Should be called within a transaction during migration execution.
307
- *
308
- * @param adapter - Database adapter to use
309
- * @param migration - Migration that was applied
310
- * @returns Promise that resolves when record is inserted
311
- */
312
- recordMigration(adapter: DrizzleAdapter, migration: Migration): Promise<void>;
313
- /**
314
- * Remove a migration record from the database.
315
- *
316
- * @remarks
317
- * Deletes a record from the `nextly_migrations` table.
318
- * Used during migration rollback operations.
319
- *
320
- * Should be called within a transaction during rollback.
321
- *
322
- * @param adapter - Database adapter to use
323
- * @param migrationId - ID of the migration to remove
324
- * @returns Promise that resolves when record is deleted
325
- */
326
- removeMigrationRecord(adapter: DrizzleAdapter, migrationId: string): Promise<void>;
327
- /**
328
- * Check if migrations table exists.
329
- *
330
- * @remarks
331
- * Queries database metadata to check if the `nextly_migrations` table exists.
332
- * Useful for determining if initialization is needed.
333
- *
334
- * @param adapter - Database adapter to use
335
- * @returns Promise with boolean indicating if table exists
336
- */
337
- migrationsTableExists(adapter: DrizzleAdapter): Promise<boolean>;
253
+ export interface MigrationHelpers {
254
+ /**
255
+ * Create the migrations tracking table if it doesn't exist.
256
+ *
257
+ * @remarks
258
+ * Creates a table named `nextly_migrations` with columns:
259
+ * - id (string, primary key)
260
+ * - name (string)
261
+ * - applied_at (timestamp)
262
+ * - checksum (string, optional)
263
+ *
264
+ * Uses CREATE TABLE IF NOT EXISTS for safety.
265
+ *
266
+ * @param adapter - Database adapter to use
267
+ * @returns Promise that resolves when table is created
268
+ */
269
+ createMigrationsTable(adapter: DrizzleAdapter): Promise<void>;
270
+ /**
271
+ * Get all applied migration records from the database.
272
+ *
273
+ * @remarks
274
+ * Queries the `nextly_migrations` table and returns all records
275
+ * sorted by applied_at descending (most recent first).
276
+ *
277
+ * @param adapter - Database adapter to use
278
+ * @returns Promise with array of applied migration records
279
+ */
280
+ getAppliedMigrations(adapter: DrizzleAdapter): Promise<MigrationRecord[]>;
281
+ /**
282
+ * Record a migration as applied in the database.
283
+ *
284
+ * @remarks
285
+ * Inserts a new record into the `nextly_migrations` table with:
286
+ * - Migration ID, name
287
+ * - Current timestamp for applied_at
288
+ * - Calculated checksum
289
+ *
290
+ * Should be called within a transaction during migration execution.
291
+ *
292
+ * @param adapter - Database adapter to use
293
+ * @param migration - Migration that was applied
294
+ * @returns Promise that resolves when record is inserted
295
+ */
296
+ recordMigration(adapter: DrizzleAdapter, migration: Migration): Promise<void>;
297
+ /**
298
+ * Remove a migration record from the database.
299
+ *
300
+ * @remarks
301
+ * Deletes a record from the `nextly_migrations` table.
302
+ * Used during migration rollback operations.
303
+ *
304
+ * Should be called within a transaction during rollback.
305
+ *
306
+ * @param adapter - Database adapter to use
307
+ * @param migrationId - ID of the migration to remove
308
+ * @returns Promise that resolves when record is deleted
309
+ */
310
+ removeMigrationRecord(adapter: DrizzleAdapter, migrationId: string): Promise<void>;
311
+ /**
312
+ * Check if migrations table exists.
313
+ *
314
+ * @remarks
315
+ * Queries database metadata to check if the `nextly_migrations` table exists.
316
+ * Useful for determining if initialization is needed.
317
+ *
318
+ * @param adapter - Database adapter to use
319
+ * @returns Promise with boolean indicating if table exists
320
+ */
321
+ migrationsTableExists(adapter: DrizzleAdapter): Promise<boolean>;
338
322
  }
339
323
  /**
340
324
  * Implementation of migration helpers.
@@ -346,6 +330,6 @@ interface MigrationHelpers {
346
330
  *
347
331
  * @public
348
332
  */
349
- declare const migrationHelpers: MigrationHelpers;
350
-
351
- export { Migration, type MigrationHelpers, MigrationOptions, MigrationRecord, MigrationStatus, type MigrationValidationResult, calculateChecksum, detectModified, filterApplied, filterPending, getMigrationStatus, migrationHelpers, sortMigrations, validateChecksum, validateMigrations };
333
+ export declare const migrationHelpers: MigrationHelpers;
334
+ export type { Migration, MigrationOptions, MigrationRecord, MigrationResult, MigrationStatus };
335
+ //# sourceMappingURL=migrations.d.cts.map
@@ -1,21 +1,5 @@
1
- import { D as DrizzleAdapter } from './adapter-BxJVtttb.js';
2
- import { M as MigrationRecord, a as Migration, b as MigrationStatus, c as MigrationOptions } from './migration-Qe70wDOC.js';
3
- export { d as MigrationResult } from './migration-Qe70wDOC.js';
4
- import './core-CVO7WYDj.js';
5
- import './schema-BIQ0YQZ_.js';
6
- import './error-um1d_3Uo.js';
7
-
8
- /**
9
- * Database migration utilities.
10
- *
11
- * @remarks
12
- * Provides core utilities for migration management including checksum calculation,
13
- * sorting, filtering, and validation. Also includes optional helpers for adapters
14
- * to use for common migration operations.
15
- *
16
- * @packageDocumentation
17
- */
18
-
1
+ import { t as DrizzleAdapter } from "./adapter-CSP-Ek-L.js";
2
+ import { _ as MigrationOptions, b as MigrationStatus, g as Migration, v as MigrationRecord, y as MigrationResult } from "./index-BYb6cDli.js";
19
3
  /**
20
4
  * Calculate SHA-256 checksum for a migration.
21
5
  *
@@ -42,7 +26,7 @@ import './error-um1d_3Uo.js';
42
26
  *
43
27
  * @public
44
28
  */
45
- declare function calculateChecksum(migration: Migration): string;
29
+ export declare function calculateChecksum(migration: Migration): string;
46
30
  /**
47
31
  * Sort migrations by timestamp in ascending order.
48
32
  *
@@ -67,7 +51,7 @@ declare function calculateChecksum(migration: Migration): string;
67
51
  *
68
52
  * @public
69
53
  */
70
- declare function sortMigrations(migrations: Migration[]): Migration[];
54
+ export declare function sortMigrations(migrations: Migration[]): Migration[];
71
55
  /**
72
56
  * Filter migrations to get only pending (unapplied) migrations.
73
57
  *
@@ -98,7 +82,7 @@ declare function sortMigrations(migrations: Migration[]): Migration[];
98
82
  *
99
83
  * @public
100
84
  */
101
- declare function filterPending(migrations: Migration[], applied: MigrationRecord[]): Migration[];
85
+ export declare function filterPending(migrations: Migration[], applied: MigrationRecord[]): Migration[];
102
86
  /**
103
87
  * Filter migration records to get only those that match given migrations.
104
88
  *
@@ -130,7 +114,7 @@ declare function filterPending(migrations: Migration[], applied: MigrationRecord
130
114
  *
131
115
  * @public
132
116
  */
133
- declare function filterApplied(migrations: Migration[], applied: MigrationRecord[]): MigrationRecord[];
117
+ export declare function filterApplied(migrations: Migration[], applied: MigrationRecord[]): MigrationRecord[];
134
118
  /**
135
119
  * Validate that a migration's checksum matches its applied record.
136
120
  *
@@ -158,7 +142,7 @@ declare function filterApplied(migrations: Migration[], applied: MigrationRecord
158
142
  *
159
143
  * @public
160
144
  */
161
- declare function validateChecksum(migration: Migration, record: MigrationRecord): boolean;
145
+ export declare function validateChecksum(migration: Migration, record: MigrationRecord): boolean;
162
146
  /**
163
147
  * Detect migrations that have been modified after being applied.
164
148
  *
@@ -185,7 +169,7 @@ declare function validateChecksum(migration: Migration, record: MigrationRecord)
185
169
  *
186
170
  * @public
187
171
  */
188
- declare function detectModified(migrations: Migration[], applied: MigrationRecord[]): MigrationRecord[];
172
+ export declare function detectModified(migrations: Migration[], applied: MigrationRecord[]): MigrationRecord[];
189
173
  /**
190
174
  * Get comprehensive migration status.
191
175
  *
@@ -206,23 +190,23 @@ declare function detectModified(migrations: Migration[], applied: MigrationRecor
206
190
  *
207
191
  * @public
208
192
  */
209
- declare function getMigrationStatus(migrations: Migration[], applied: MigrationRecord[]): MigrationStatus;
193
+ export declare function getMigrationStatus(migrations: Migration[], applied: MigrationRecord[]): MigrationStatus;
210
194
  /**
211
195
  * Validation result for migrations.
212
196
  *
213
197
  * @public
214
198
  */
215
- interface MigrationValidationResult {
216
- /** Whether all validations passed */
217
- valid: boolean;
218
- /** List of validation errors */
219
- errors: string[];
220
- /** List of validation warnings */
221
- warnings: string[];
222
- /** Migrations that have been modified */
223
- modified: MigrationRecord[];
224
- /** Duplicate migration IDs found */
225
- duplicates: string[];
199
+ export interface MigrationValidationResult {
200
+ /** Whether all validations passed */
201
+ valid: boolean;
202
+ /** List of validation errors */
203
+ errors: string[];
204
+ /** List of validation warnings */
205
+ warnings: string[];
206
+ /** Migrations that have been modified */
207
+ modified: MigrationRecord[];
208
+ /** Duplicate migration IDs found */
209
+ duplicates: string[];
226
210
  }
227
211
  /**
228
212
  * Validate migrations for common issues.
@@ -253,7 +237,7 @@ interface MigrationValidationResult {
253
237
  *
254
238
  * @public
255
239
  */
256
- declare function validateMigrations(migrations: Migration[], applied: MigrationRecord[], options?: MigrationOptions): MigrationValidationResult;
240
+ export declare function validateMigrations(migrations: Migration[], applied: MigrationRecord[], options?: MigrationOptions): MigrationValidationResult;
257
241
  /**
258
242
  * Helper functions for managing migrations in database adapters.
259
243
  *
@@ -266,75 +250,75 @@ declare function validateMigrations(migrations: Migration[], applied: MigrationR
266
250
  *
267
251
  * @public
268
252
  */
269
- interface MigrationHelpers {
270
- /**
271
- * Create the migrations tracking table if it doesn't exist.
272
- *
273
- * @remarks
274
- * Creates a table named `nextly_migrations` with columns:
275
- * - id (string, primary key)
276
- * - name (string)
277
- * - applied_at (timestamp)
278
- * - checksum (string, optional)
279
- *
280
- * Uses CREATE TABLE IF NOT EXISTS for safety.
281
- *
282
- * @param adapter - Database adapter to use
283
- * @returns Promise that resolves when table is created
284
- */
285
- createMigrationsTable(adapter: DrizzleAdapter): Promise<void>;
286
- /**
287
- * Get all applied migration records from the database.
288
- *
289
- * @remarks
290
- * Queries the `nextly_migrations` table and returns all records
291
- * sorted by applied_at descending (most recent first).
292
- *
293
- * @param adapter - Database adapter to use
294
- * @returns Promise with array of applied migration records
295
- */
296
- getAppliedMigrations(adapter: DrizzleAdapter): Promise<MigrationRecord[]>;
297
- /**
298
- * Record a migration as applied in the database.
299
- *
300
- * @remarks
301
- * Inserts a new record into the `nextly_migrations` table with:
302
- * - Migration ID, name
303
- * - Current timestamp for applied_at
304
- * - Calculated checksum
305
- *
306
- * Should be called within a transaction during migration execution.
307
- *
308
- * @param adapter - Database adapter to use
309
- * @param migration - Migration that was applied
310
- * @returns Promise that resolves when record is inserted
311
- */
312
- recordMigration(adapter: DrizzleAdapter, migration: Migration): Promise<void>;
313
- /**
314
- * Remove a migration record from the database.
315
- *
316
- * @remarks
317
- * Deletes a record from the `nextly_migrations` table.
318
- * Used during migration rollback operations.
319
- *
320
- * Should be called within a transaction during rollback.
321
- *
322
- * @param adapter - Database adapter to use
323
- * @param migrationId - ID of the migration to remove
324
- * @returns Promise that resolves when record is deleted
325
- */
326
- removeMigrationRecord(adapter: DrizzleAdapter, migrationId: string): Promise<void>;
327
- /**
328
- * Check if migrations table exists.
329
- *
330
- * @remarks
331
- * Queries database metadata to check if the `nextly_migrations` table exists.
332
- * Useful for determining if initialization is needed.
333
- *
334
- * @param adapter - Database adapter to use
335
- * @returns Promise with boolean indicating if table exists
336
- */
337
- migrationsTableExists(adapter: DrizzleAdapter): Promise<boolean>;
253
+ export interface MigrationHelpers {
254
+ /**
255
+ * Create the migrations tracking table if it doesn't exist.
256
+ *
257
+ * @remarks
258
+ * Creates a table named `nextly_migrations` with columns:
259
+ * - id (string, primary key)
260
+ * - name (string)
261
+ * - applied_at (timestamp)
262
+ * - checksum (string, optional)
263
+ *
264
+ * Uses CREATE TABLE IF NOT EXISTS for safety.
265
+ *
266
+ * @param adapter - Database adapter to use
267
+ * @returns Promise that resolves when table is created
268
+ */
269
+ createMigrationsTable(adapter: DrizzleAdapter): Promise<void>;
270
+ /**
271
+ * Get all applied migration records from the database.
272
+ *
273
+ * @remarks
274
+ * Queries the `nextly_migrations` table and returns all records
275
+ * sorted by applied_at descending (most recent first).
276
+ *
277
+ * @param adapter - Database adapter to use
278
+ * @returns Promise with array of applied migration records
279
+ */
280
+ getAppliedMigrations(adapter: DrizzleAdapter): Promise<MigrationRecord[]>;
281
+ /**
282
+ * Record a migration as applied in the database.
283
+ *
284
+ * @remarks
285
+ * Inserts a new record into the `nextly_migrations` table with:
286
+ * - Migration ID, name
287
+ * - Current timestamp for applied_at
288
+ * - Calculated checksum
289
+ *
290
+ * Should be called within a transaction during migration execution.
291
+ *
292
+ * @param adapter - Database adapter to use
293
+ * @param migration - Migration that was applied
294
+ * @returns Promise that resolves when record is inserted
295
+ */
296
+ recordMigration(adapter: DrizzleAdapter, migration: Migration): Promise<void>;
297
+ /**
298
+ * Remove a migration record from the database.
299
+ *
300
+ * @remarks
301
+ * Deletes a record from the `nextly_migrations` table.
302
+ * Used during migration rollback operations.
303
+ *
304
+ * Should be called within a transaction during rollback.
305
+ *
306
+ * @param adapter - Database adapter to use
307
+ * @param migrationId - ID of the migration to remove
308
+ * @returns Promise that resolves when record is deleted
309
+ */
310
+ removeMigrationRecord(adapter: DrizzleAdapter, migrationId: string): Promise<void>;
311
+ /**
312
+ * Check if migrations table exists.
313
+ *
314
+ * @remarks
315
+ * Queries database metadata to check if the `nextly_migrations` table exists.
316
+ * Useful for determining if initialization is needed.
317
+ *
318
+ * @param adapter - Database adapter to use
319
+ * @returns Promise with boolean indicating if table exists
320
+ */
321
+ migrationsTableExists(adapter: DrizzleAdapter): Promise<boolean>;
338
322
  }
339
323
  /**
340
324
  * Implementation of migration helpers.
@@ -346,6 +330,6 @@ interface MigrationHelpers {
346
330
  *
347
331
  * @public
348
332
  */
349
- declare const migrationHelpers: MigrationHelpers;
350
-
351
- export { Migration, type MigrationHelpers, MigrationOptions, MigrationRecord, MigrationStatus, type MigrationValidationResult, calculateChecksum, detectModified, filterApplied, filterPending, getMigrationStatus, migrationHelpers, sortMigrations, validateChecksum, validateMigrations };
333
+ export declare const migrationHelpers: MigrationHelpers;
334
+ export type { Migration, MigrationOptions, MigrationRecord, MigrationResult, MigrationStatus };
335
+ //# sourceMappingURL=migrations.d.ts.map