Files
travel-app/node_modules/bullmq/dist/cjs/postgres/migrations/index.js
2026-08-09 21:56:00 +00:00

27 lines
1021 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LATEST_SCHEMA_VERSION = exports.MIGRATIONS = void 0;
const sql_loader_1 = require("../sql-loader");
/**
* The ordered list of migrations bundled with this version of BullMQ. Append a
* new entry (never edit or reorder existing ones) whenever the schema changes.
*/
exports.MIGRATIONS = [
{
version: 1,
name: '0001_schema',
load: () => (0, sql_loader_1.loadMigrationSql)('0001_schema.sql'),
},
{
version: 2,
name: '0002_functions',
load: () => (0, sql_loader_1.loadMigrationSql)('0002_functions.sql'),
},
];
/**
* The highest schema version this BullMQ build knows how to produce. Compared
* against the version recorded in the database to decide whether to migrate
* (database older), no-op (equal), or refuse to run (database newer).
*/
exports.LATEST_SCHEMA_VERSION = exports.MIGRATIONS.length > 0 ? exports.MIGRATIONS[exports.MIGRATIONS.length - 1].version : 0;