velocious 1.0.533 → 1.0.534

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
@@ -1102,6 +1102,8 @@ export default class CreateEvents extends Migration {
1102
1102
  }
1103
1103
  ```
1104
1104
 
1105
+ Migrations that must be rerunnable can guard changes with `tableExists(...)`, `columnExists(table, column)` and `indexExists(table, index)` — a missing table yields `false` rather than throwing. See [docs/database-migrations.md](docs/database-migrations.md#guarding-schema-changes-in-rerunnable-migrations).
1106
+
1105
1107
  ## Run migrations from the command line
1106
1108
 
1107
1109
  ```bash
@@ -100,6 +100,27 @@ export default class BackgroundJobsStore {
100
100
  }
101
101
  }
102
102
 
103
+ /**
104
+ * Ensures the background-jobs schema (tables + columns) exists on the configured
105
+ * database, without initializing the runtime model. Lets `db:migrate` create the
106
+ * framework's own schema deterministically alongside app migrations — and capture
107
+ * it in the dumped structure SQL — instead of it only appearing once a store boots.
108
+ * Idempotent: reuses the same `_ensureSchema` the runtime store uses, which skips
109
+ * work already applied (tracked in `velocious_internal_migrations`).
110
+ * @param {import("../database/drivers/base.js").default} [db] - Reuse an already
111
+ * checked-out connection (e.g. the one `db:migrate` holds) rather than opening a
112
+ * nested checkout that would deadlock a single-connection pool.
113
+ * @returns {Promise<void>} - Resolves when the schema is present.
114
+ */
115
+ async ensureSchema(db) {
116
+ // When a connection is handed in (the db:migrate path), the caller already owns
117
+ // the active configuration + connection context; calling setCurrent() here would
118
+ // clobber it (e.g. the browser test runner juggles multiple configurations).
119
+ if (!db) this.configuration.setCurrent()
120
+
121
+ await this._ensureSchema(db)
122
+ }
123
+
103
124
  /**
104
125
  * Runs enqueue.
105
126
  * @param {object} args - Options.
@@ -746,35 +767,59 @@ export default class BackgroundJobsStore {
746
767
  throw VelociousError.safe("background job scheduledAtMs must be a non-negative safe integer")
747
768
  }
748
769
 
749
- async _ensureSchema() {
750
- await this._withDb(async (db) => {
751
- await this._ensureMigrationsTable(db)
752
-
753
- const alreadyApplied = await this._hasMigration(db)
754
-
755
- // Even when the migration row is present, the jobs table itself can have
756
- // been dropped underneath us by a transaction rollback in another caller
757
- // (DDL is transactional on SQLite/MSSQL). Verify the table physically
758
- // exists and recreate it when missing rather than trusting the migration
759
- // row alone, otherwise later callers fail with "no such table".
760
- if (alreadyApplied && await db.tableExists(JOBS_TABLE)) {
761
- await this._ensureJobsTableColumns(db)
762
- await this._ensureConcurrencyTable(db)
763
- await this._reconcileQueueConcurrency(db)
764
- await this._reconcileConcurrency(db)
765
- return
766
- }
770
+ /**
771
+ * Ensures the background-jobs schema exists, reusing a caller-held connection when
772
+ * one is given rather than checking out its own.
773
+ * @param {import("../database/drivers/base.js").default} [existingDb] - Reuse an
774
+ * already-checked-out connection (e.g. the one `db:migrate` holds) instead of
775
+ * checking out a nested one — the nested checkout would deadlock a database
776
+ * whose pool is capped at a single connection already held by the caller.
777
+ * @returns {Promise<void>} - Resolves when the schema is present.
778
+ */
779
+ async _ensureSchema(existingDb) {
780
+ if (existingDb) {
781
+ await this._applySchema(existingDb)
782
+
783
+ return
784
+ }
767
785
 
768
- await this._applyMigrations(db)
786
+ await this._withDb((db) => this._applySchema(db))
787
+ }
788
+
789
+ /**
790
+ * Creates or upgrades the background-jobs tables, columns and concurrency rows on
791
+ * the given connection.
792
+ * @param {import("../database/drivers/base.js").default} db - Database connection.
793
+ * @returns {Promise<void>} - Resolves when the schema is present.
794
+ */
795
+ async _applySchema(db) {
796
+ await this._ensureMigrationsTable(db)
797
+
798
+ const alreadyApplied = await this._hasMigration(db)
799
+
800
+ // Even when the migration row is present, the jobs table itself can have
801
+ // been dropped underneath us by a transaction rollback in another caller
802
+ // (DDL is transactional on SQLite/MSSQL). Verify the table physically
803
+ // exists and recreate it when missing rather than trusting the migration
804
+ // row alone, otherwise later callers fail with "no such table".
805
+ if (alreadyApplied && await db.tableExists(JOBS_TABLE)) {
769
806
  await this._ensureJobsTableColumns(db)
770
807
  await this._ensureConcurrencyTable(db)
771
808
  await this._reconcileQueueConcurrency(db)
772
809
  await this._reconcileConcurrency(db)
773
810
 
774
- if (alreadyApplied) return
811
+ return
812
+ }
813
+
814
+ await this._applyMigrations(db)
815
+ await this._ensureJobsTableColumns(db)
816
+ await this._ensureConcurrencyTable(db)
817
+ await this._reconcileQueueConcurrency(db)
818
+ await this._reconcileConcurrency(db)
775
819
 
776
- await this._recordMigration(db, MIGRATION_VERSION)
777
- })
820
+ if (alreadyApplied) return
821
+
822
+ await this._recordMigration(db, MIGRATION_VERSION)
778
823
  }
779
824
 
780
825
  /**
@@ -468,6 +468,26 @@ export default class VelociousDatabaseMigration {
468
468
  return Boolean(false)
469
469
  }
470
470
 
471
+ /**
472
+ * Checks whether an index with the given name exists on a table.
473
+ * @param {string} tableName - Table name.
474
+ * @param {string} indexName - Index name to look for.
475
+ * @returns {Promise<boolean>} - Whether the index exists on the table.
476
+ */
477
+ async indexExists(tableName, indexName) {
478
+ const table = await this.getDriver().getTableByName(tableName, {throwError: false})
479
+
480
+ if (table) {
481
+ for (const index of await table.getIndexes()) {
482
+ if (index.getName() == indexName) {
483
+ return true
484
+ }
485
+ }
486
+ }
487
+
488
+ return false
489
+ }
490
+
471
491
  /**
472
492
  * Sets up the database schema for a gap-less positional list. Adds the
473
493
  * position column (INT NOT NULL) if absent and creates a UNIQUE index on
@@ -204,6 +204,11 @@ export default class VelociousDatabaseMigrator {
204
204
 
205
205
  if (!environmentHandler || Object.keys(filteredDbs).length == 0) return
206
206
 
207
+ // Ensure velocious' own framework schema (background jobs) before the structure
208
+ // dump, and unconditionally — the dump is gated to enabled environments but the
209
+ // framework schema must exist after every migrate so `db:migrate` (and thus
210
+ // schema:load of the dumped SQL) produces a complete DB in every environment.
211
+ await environmentHandler.ensureFrameworkSchema({dbs: filteredDbs})
207
212
  await environmentHandler.afterMigrations({dbs: filteredDbs})
208
213
  }
209
214
 
@@ -508,6 +508,20 @@ export default class VelociousEnvironmentHandlerBase {
508
508
  return
509
509
  }
510
510
 
511
+ /**
512
+ * Ensures velocious' own framework-owned schema (e.g. the background-jobs
513
+ * tables) exists after app migrations run, so `db:migrate` produces a complete
514
+ * schema deterministically instead of it only appearing once a runtime store
515
+ * boots. Runs before the structure dump. No-op by default; the node handler
516
+ * overrides it.
517
+ * @param {object} args - Options object.
518
+ * @param {Record<string, import("../database/drivers/base.js").default>} args.dbs - Dbs being migrated.
519
+ * @returns {Promise<void>} - Resolves when complete.
520
+ */
521
+ async ensureFrameworkSchema(args) { // eslint-disable-line no-unused-vars
522
+ return
523
+ }
524
+
511
525
  /**
512
526
  * Runs require command.
513
527
  * @abstract
@@ -1005,6 +1005,29 @@ export default class VelociousEnvironmentHandlerNode extends Base{
1005
1005
  return basePath
1006
1006
  }
1007
1007
 
1008
+ /**
1009
+ * Ensures velocious' background-jobs schema exists on its configured database
1010
+ * as part of `db:migrate`, so the framework's own tables (background_jobs +
1011
+ * background_job_concurrency, execution_mode etc.) are created deterministically
1012
+ * alongside app migrations and captured in the dumped structure SQL — rather than
1013
+ * only appearing once a runtime store boots. Reuses the store's idempotent
1014
+ * `_ensureSchema`, so it's safe to re-run against DBs that already have it.
1015
+ * @param {object} args - Options object.
1016
+ * @param {Record<string, import("../database/drivers/base.js").default>} args.dbs - Dbs being migrated.
1017
+ * @returns {Promise<void>} - Resolves when complete.
1018
+ */
1019
+ async ensureFrameworkSchema({dbs}) {
1020
+ const {default: BackgroundJobsStore} = await import("../background-jobs/store.js")
1021
+ const store = new BackgroundJobsStore({configuration: this.getConfiguration()})
1022
+ const databaseIdentifier = store.getDatabaseIdentifier() ?? "default"
1023
+
1024
+ // Reuse the connection db:migrate already holds for this database; opening a
1025
+ // nested checkout would deadlock a database whose pool is capped at one
1026
+ // connection. When the background-jobs database isn't among the migrated set,
1027
+ // this passes undefined and the store checks out its own (that pool is free).
1028
+ await store.ensureSchema(dbs[databaseIdentifier])
1029
+ }
1030
+
1008
1031
  /**
1009
1032
  * Runs after migrations.
1010
1033
  * @param {object} args - Options object.
@@ -24,6 +24,19 @@ export default class BackgroundJobsStore {
24
24
  * @returns {Promise<void>} - Resolves when ready.
25
25
  */
26
26
  ensureReady(): Promise<void>;
27
+ /**
28
+ * Ensures the background-jobs schema (tables + columns) exists on the configured
29
+ * database, without initializing the runtime model. Lets `db:migrate` create the
30
+ * framework's own schema deterministically alongside app migrations — and capture
31
+ * it in the dumped structure SQL — instead of it only appearing once a store boots.
32
+ * Idempotent: reuses the same `_ensureSchema` the runtime store uses, which skips
33
+ * work already applied (tracked in `velocious_internal_migrations`).
34
+ * @param {import("../database/drivers/base.js").default} [db] - Reuse an already
35
+ * checked-out connection (e.g. the one `db:migrate` holds) rather than opening a
36
+ * nested checkout that would deadlock a single-connection pool.
37
+ * @returns {Promise<void>} - Resolves when the schema is present.
38
+ */
39
+ ensureSchema(db?: import("../database/drivers/base.js").default): Promise<void>;
27
40
  /**
28
41
  * Runs enqueue.
29
42
  * @param {object} args - Options.
@@ -269,7 +282,23 @@ export default class BackgroundJobsStore {
269
282
  * @returns {number} - Dispatch timestamp.
270
283
  */
271
284
  _normalizeScheduledAtMs(scheduledAtMs: number | undefined, defaultScheduledAtMs: number): number;
272
- _ensureSchema(): Promise<void>;
285
+ /**
286
+ * Ensures the background-jobs schema exists, reusing a caller-held connection when
287
+ * one is given rather than checking out its own.
288
+ * @param {import("../database/drivers/base.js").default} [existingDb] - Reuse an
289
+ * already-checked-out connection (e.g. the one `db:migrate` holds) instead of
290
+ * checking out a nested one — the nested checkout would deadlock a database
291
+ * whose pool is capped at a single connection already held by the caller.
292
+ * @returns {Promise<void>} - Resolves when the schema is present.
293
+ */
294
+ _ensureSchema(existingDb?: import("../database/drivers/base.js").default): Promise<void>;
295
+ /**
296
+ * Creates or upgrades the background-jobs tables, columns and concurrency rows on
297
+ * the given connection.
298
+ * @param {import("../database/drivers/base.js").default} db - Database connection.
299
+ * @returns {Promise<void>} - Resolves when the schema is present.
300
+ */
301
+ _applySchema(db: import("../database/drivers/base.js").default): Promise<void>;
273
302
  /**
274
303
  * Runs ensure migrations table.
275
304
  * @param {import("../database/drivers/base.js").default} db - Database connection.
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/background-jobs/store.js"],"names":[],"mappings":"AAyDA;IACE;;;;;OAKG;IACH,mDAHG;QAAoD,aAAa,EAAzD,OAAO,qBAAqB,EAAE,OAAO;QACvB,kBAAkB;KAC1C,EAOA;IALC,qDAAkC;IAClC,uCAA4C;IAC5C,eAA8B;IAC9B,oCAAyB;IACzB,qCAAwC;IAG1C;;;OAGG;IACH,yBAFa,MAAM,CAMlB;IAED;;;OAGG;IACH,eAFa,OAAO,CAAC,IAAI,CAAC,CAgBzB;IAED;;;;;;;OAOG;IACH,oCALG;QAAqB,OAAO,EAApB,MAAM;QACS,IAAI,EAAnB,KAAK,CAAC,OAAC,CAAC;QACyC,OAAO;KAChE,GAAU,OAAO,CAAC,MAAM,CAAC,CA6D3B;IAED;;;;;OAKG;IACH,wBAHG;QAAmH,aAAa;KAChI,GAAU,OAAO,CAAC,OAAO,YAAY,EAAE,gBAAgB,GAAG,IAAI,CAAC,CAYjE;IAED;;;;;;;OAOG;IACH,oBAFa,OAAO,CAAC,OAAO,YAAY,EAAE,gBAAgB,GAAG,IAAI,CAAC,CAQjE;IAED;;;;;;;OAOG;IACH,2DALG;QAA4D,EAAE,EAAtD,OAAO,6BAA6B,EAAE,OAAO;QAC5B,mBAAmB,EAApC,IAAI,GAAG,GAAG;QACiG,aAAa;KAChI,GAAU,OAAO,CAAC,OAAO,YAAY,EAAE,gBAAgB,GAAG,IAAI,CAAC,CAwCjE;IAED;;;;;;;;;;;;OAYG;IACH,2BAHW,OAAO,6BAA6B,EAAE,OAAO,GAC3C,MAAM,GAAG,IAAI,CAqBzB;IAED;;;;OAIG;IACH,cAHW,MAAM,GACJ,OAAO,CAAC,OAAO,YAAY,EAAE,gBAAgB,GAAG,IAAI,CAAC,CAmBjE;IAED;;;OAGG;IACH,kBAFa,OAAO,C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