@payloadcms/drizzle 4.0.0-internal.9726517 → 4.0.0-internal.add4c47
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/exports/postgres.d.ts +0 -1
- package/dist/exports/postgres.d.ts.map +1 -1
- package/dist/exports/postgres.js +0 -1
- package/dist/exports/postgres.js.map +1 -1
- package/dist/exports/sqlite.d.ts +0 -1
- package/dist/exports/sqlite.d.ts.map +1 -1
- package/dist/exports/sqlite.js +0 -1
- package/dist/exports/sqlite.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/postgres/predefinedMigrations/jobs-processing-lease/index.d.ts +0 -12
- package/dist/postgres/predefinedMigrations/jobs-processing-lease/index.d.ts.map +0 -1
- package/dist/postgres/predefinedMigrations/jobs-processing-lease/index.js +0 -20
- package/dist/postgres/predefinedMigrations/jobs-processing-lease/index.js.map +0 -1
- package/dist/sqlite/predefinedMigrations/jobs-processing-lease/index.d.ts +0 -12
- package/dist/sqlite/predefinedMigrations/jobs-processing-lease/index.d.ts.map +0 -1
- package/dist/sqlite/predefinedMigrations/jobs-processing-lease/index.js +0 -20
- package/dist/sqlite/predefinedMigrations/jobs-processing-lease/index.js.map +0 -1
- package/dist/utilities/jobsProcessingLeaseMigration.d.ts +0 -6
- package/dist/utilities/jobsProcessingLeaseMigration.d.ts.map +0 -1
- package/dist/utilities/jobsProcessingLeaseMigration.js +0 -64
- package/dist/utilities/jobsProcessingLeaseMigration.js.map +0 -1
- package/dist/utilities/jobsProcessingLeaseMigration.spec.js +0 -166
- package/dist/utilities/jobsProcessingLeaseMigration.spec.js.map +0 -1
|
@@ -9,7 +9,6 @@ export { dropDatabase } from '../postgres/dropDatabase.js';
|
|
|
9
9
|
export { execute } from '../postgres/execute.js';
|
|
10
10
|
export { init } from '../postgres/init.js';
|
|
11
11
|
export { insert } from '../postgres/insert.js';
|
|
12
|
-
export { migratePostgresJobsProcessingLease } from '../postgres/predefinedMigrations/jobs-processing-lease/index.js';
|
|
13
12
|
export { migratePostgresLocalizeStatus } from '../postgres/predefinedMigrations/localize-status/index.js';
|
|
14
13
|
export { migratePostgresV2toV3 } from '../postgres/predefinedMigrations/v2-v3/index.js';
|
|
15
14
|
export { requireDrizzleKit } from '../postgres/requireDrizzleKit.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../src/exports/postgres.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAA;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAA;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../src/exports/postgres.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAA;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAA;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,6BAA6B,EAAE,MAAM,2DAA2D,CAAA;AACzG,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAA;AACvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAA;AACrE,cAAc,sBAAsB,CAAA"}
|
package/dist/exports/postgres.js
CHANGED
|
@@ -9,7 +9,6 @@ export { dropDatabase } from '../postgres/dropDatabase.js';
|
|
|
9
9
|
export { execute } from '../postgres/execute.js';
|
|
10
10
|
export { init } from '../postgres/init.js';
|
|
11
11
|
export { insert } from '../postgres/insert.js';
|
|
12
|
-
export { migratePostgresJobsProcessingLease } from '../postgres/predefinedMigrations/jobs-processing-lease/index.js';
|
|
13
12
|
export { migratePostgresLocalizeStatus } from '../postgres/predefinedMigrations/localize-status/index.js';
|
|
14
13
|
export { migratePostgresV2toV3 } from '../postgres/predefinedMigrations/v2-v3/index.js';
|
|
15
14
|
export { requireDrizzleKit } from '../postgres/requireDrizzleKit.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/exports/postgres.ts"],"sourcesContent":["export { columnToCodeConverter } from '../postgres/columnToCodeConverter.js'\nexport { countDistinct } from '../postgres/countDistinct.js'\nexport { createDatabase } from '../postgres/createDatabase.js'\nexport { createExtensions } from '../postgres/createExtensions.js'\nexport { createJSONQuery } from '../postgres/createJSONQuery/index.js'\nexport { defaultDrizzleSnapshot } from '../postgres/defaultSnapshot.js'\nexport { deleteWhere } from '../postgres/deleteWhere.js'\nexport { dropDatabase } from '../postgres/dropDatabase.js'\nexport { execute } from '../postgres/execute.js'\nexport { init } from '../postgres/init.js'\nexport { insert } from '../postgres/insert.js'\nexport {
|
|
1
|
+
{"version":3,"sources":["../../src/exports/postgres.ts"],"sourcesContent":["export { columnToCodeConverter } from '../postgres/columnToCodeConverter.js'\nexport { countDistinct } from '../postgres/countDistinct.js'\nexport { createDatabase } from '../postgres/createDatabase.js'\nexport { createExtensions } from '../postgres/createExtensions.js'\nexport { createJSONQuery } from '../postgres/createJSONQuery/index.js'\nexport { defaultDrizzleSnapshot } from '../postgres/defaultSnapshot.js'\nexport { deleteWhere } from '../postgres/deleteWhere.js'\nexport { dropDatabase } from '../postgres/dropDatabase.js'\nexport { execute } from '../postgres/execute.js'\nexport { init } from '../postgres/init.js'\nexport { insert } from '../postgres/insert.js'\nexport { migratePostgresLocalizeStatus } from '../postgres/predefinedMigrations/localize-status/index.js'\nexport { migratePostgresV2toV3 } from '../postgres/predefinedMigrations/v2-v3/index.js'\nexport { requireDrizzleKit } from '../postgres/requireDrizzleKit.js'\nexport { geometryColumn } from '../postgres/schema/geometryColumn.js'\nexport * from '../postgres/types.js'\n"],"names":["columnToCodeConverter","countDistinct","createDatabase","createExtensions","createJSONQuery","defaultDrizzleSnapshot","deleteWhere","dropDatabase","execute","init","insert","migratePostgresLocalizeStatus","migratePostgresV2toV3","requireDrizzleKit","geometryColumn"],"mappings":"AAAA,SAASA,qBAAqB,QAAQ,uCAAsC;AAC5E,SAASC,aAAa,QAAQ,+BAA8B;AAC5D,SAASC,cAAc,QAAQ,gCAA+B;AAC9D,SAASC,gBAAgB,QAAQ,kCAAiC;AAClE,SAASC,eAAe,QAAQ,uCAAsC;AACtE,SAASC,sBAAsB,QAAQ,iCAAgC;AACvE,SAASC,WAAW,QAAQ,6BAA4B;AACxD,SAASC,YAAY,QAAQ,8BAA6B;AAC1D,SAASC,OAAO,QAAQ,yBAAwB;AAChD,SAASC,IAAI,QAAQ,sBAAqB;AAC1C,SAASC,MAAM,QAAQ,wBAAuB;AAC9C,SAASC,6BAA6B,QAAQ,4DAA2D;AACzG,SAASC,qBAAqB,QAAQ,kDAAiD;AACvF,SAASC,iBAAiB,QAAQ,mCAAkC;AACpE,SAASC,cAAc,QAAQ,uCAAsC;AACrE,cAAc,uBAAsB"}
|
package/dist/exports/sqlite.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export { dropDatabase } from '../sqlite/dropDatabase.js';
|
|
|
8
8
|
export { execute } from '../sqlite/execute.js';
|
|
9
9
|
export { init } from '../sqlite/init.js';
|
|
10
10
|
export { insert } from '../sqlite/insert.js';
|
|
11
|
-
export { migrateSqliteJobsProcessingLease } from '../sqlite/predefinedMigrations/jobs-processing-lease/index.js';
|
|
12
11
|
export { migrateSqliteLocalizeStatus } from '../sqlite/predefinedMigrations/localize-status/index.js';
|
|
13
12
|
export { requireDrizzleKit } from '../sqlite/requireDrizzleKit.js';
|
|
14
13
|
export * from '../sqlite/types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../src/exports/sqlite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAA;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAA;AACpG,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../src/exports/sqlite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAA;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAA;AACpG,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,2BAA2B,EAAE,MAAM,yDAAyD,CAAA;AACrG,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,cAAc,oBAAoB,CAAA"}
|
package/dist/exports/sqlite.js
CHANGED
|
@@ -8,7 +8,6 @@ export { dropDatabase } from '../sqlite/dropDatabase.js';
|
|
|
8
8
|
export { execute } from '../sqlite/execute.js';
|
|
9
9
|
export { init } from '../sqlite/init.js';
|
|
10
10
|
export { insert } from '../sqlite/insert.js';
|
|
11
|
-
export { migrateSqliteJobsProcessingLease } from '../sqlite/predefinedMigrations/jobs-processing-lease/index.js';
|
|
12
11
|
export { migrateSqliteLocalizeStatus } from '../sqlite/predefinedMigrations/localize-status/index.js';
|
|
13
12
|
export { requireDrizzleKit } from '../sqlite/requireDrizzleKit.js';
|
|
14
13
|
export * from '../sqlite/types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/exports/sqlite.ts"],"sourcesContent":["export { columnToCodeConverter } from '../sqlite/columnToCodeConverter.js'\nexport { countDistinct } from '../sqlite/countDistinct.js'\nexport { convertPathToJSONTraversal } from '../sqlite/createJSONQuery/convertPathToJSONTraversal.js'\nexport { createJSONQuery } from '../sqlite/createJSONQuery/index.js'\nexport { defaultDrizzleSnapshot } from '../sqlite/defaultSnapshot.js'\nexport { deleteWhere } from '../sqlite/deleteWhere.js'\nexport { dropDatabase } from '../sqlite/dropDatabase.js'\nexport { execute } from '../sqlite/execute.js'\nexport { init } from '../sqlite/init.js'\nexport { insert } from '../sqlite/insert.js'\nexport {
|
|
1
|
+
{"version":3,"sources":["../../src/exports/sqlite.ts"],"sourcesContent":["export { columnToCodeConverter } from '../sqlite/columnToCodeConverter.js'\nexport { countDistinct } from '../sqlite/countDistinct.js'\nexport { convertPathToJSONTraversal } from '../sqlite/createJSONQuery/convertPathToJSONTraversal.js'\nexport { createJSONQuery } from '../sqlite/createJSONQuery/index.js'\nexport { defaultDrizzleSnapshot } from '../sqlite/defaultSnapshot.js'\nexport { deleteWhere } from '../sqlite/deleteWhere.js'\nexport { dropDatabase } from '../sqlite/dropDatabase.js'\nexport { execute } from '../sqlite/execute.js'\nexport { init } from '../sqlite/init.js'\nexport { insert } from '../sqlite/insert.js'\nexport { migrateSqliteLocalizeStatus } from '../sqlite/predefinedMigrations/localize-status/index.js'\nexport { requireDrizzleKit } from '../sqlite/requireDrizzleKit.js'\nexport * from '../sqlite/types.js'\n"],"names":["columnToCodeConverter","countDistinct","convertPathToJSONTraversal","createJSONQuery","defaultDrizzleSnapshot","deleteWhere","dropDatabase","execute","init","insert","migrateSqliteLocalizeStatus","requireDrizzleKit"],"mappings":"AAAA,SAASA,qBAAqB,QAAQ,qCAAoC;AAC1E,SAASC,aAAa,QAAQ,6BAA4B;AAC1D,SAASC,0BAA0B,QAAQ,0DAAyD;AACpG,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,sBAAsB,QAAQ,+BAA8B;AACrE,SAASC,WAAW,QAAQ,2BAA0B;AACtD,SAASC,YAAY,QAAQ,4BAA2B;AACxD,SAASC,OAAO,QAAQ,uBAAsB;AAC9C,SAASC,IAAI,QAAQ,oBAAmB;AACxC,SAASC,MAAM,QAAQ,sBAAqB;AAC5C,SAASC,2BAA2B,QAAQ,0DAAyD;AACrG,SAASC,iBAAiB,QAAQ,iCAAgC;AAClE,cAAc,qBAAoB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -48,7 +48,6 @@ export { createSchemaGenerator } from './utilities/createSchemaGenerator.js';
|
|
|
48
48
|
export { executeSchemaHooks } from './utilities/executeSchemaHooks.js';
|
|
49
49
|
export { extendDrizzleTable } from './utilities/extendDrizzleTable.js';
|
|
50
50
|
export { hasLocalesTable } from './utilities/hasLocalesTable.js';
|
|
51
|
-
export { buildDynamicPredefinedJobsProcessingLeaseMigration } from './utilities/jobsProcessingLeaseMigration.js';
|
|
52
51
|
export { pushDevSchema } from './utilities/pushDevSchema.js';
|
|
53
52
|
export { validateExistingBlockIsIdentical } from './utilities/validateExistingBlockIsIdentical.js';
|
|
54
53
|
/**
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0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,WAAW,EACX,QAAQ,EACR,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,eAAe,GAChB,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EACL,2CAA2C,EAC3C,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAA;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,EAAE,gCAAgC,EAAE,MAAM,iDAAiD,CAAA;AAGlG;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,mCAA0B,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -46,7 +46,6 @@ export { createSchemaGenerator } from './utilities/createSchemaGenerator.js';
|
|
|
46
46
|
export { executeSchemaHooks } from './utilities/executeSchemaHooks.js';
|
|
47
47
|
export { extendDrizzleTable } from './utilities/extendDrizzleTable.js';
|
|
48
48
|
export { hasLocalesTable } from './utilities/hasLocalesTable.js';
|
|
49
|
-
export { buildDynamicPredefinedJobsProcessingLeaseMigration } from './utilities/jobsProcessingLeaseMigration.js';
|
|
50
49
|
export { pushDevSchema } from './utilities/pushDevSchema.js';
|
|
51
50
|
export { validateExistingBlockIsIdentical } from './utilities/validateExistingBlockIsIdentical.js';
|
|
52
51
|
import { findMigrationDir as payloadFindMigrationDir } from 'payload';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { count } from './count.js'\nexport { countGlobalVersions } from './countGlobalVersions.js'\nexport { countVersions } from './countVersions.js'\nexport { create } from './create.js'\nexport { createGlobal } from './createGlobal.js'\nexport { createGlobalVersion } from './createGlobalVersion.js'\nexport { createTableName } from './createTableName.js'\nexport { createVersion } from './createVersion.js'\nexport { deleteMany } from './deleteMany.js'\nexport { deleteOne } from './deleteOne.js'\nexport { deleteVersions } from './deleteVersions.js'\nexport { destroy } from './destroy.js'\nexport { find } from './find.js'\nexport { findDistinct } from './findDistinct.js'\nexport { findGlobal } from './findGlobal.js'\nexport { findGlobalVersions } from './findGlobalVersions.js'\nexport { findOne } from './findOne.js'\nexport { findVersions } from './findVersions.js'\nexport { migrate } from './migrate.js'\nexport { migrateDown } from './migrateDown.js'\nexport { migrateFresh } from './migrateFresh.js'\nexport { migrateRefresh } from './migrateRefresh.js'\nexport { migrateReset } from './migrateReset.js'\nexport { migrateStatus } from './migrateStatus.js'\nexport { buildQuery } from './queries/buildQuery.js'\nexport { operatorMap } from './queries/operatorMap.js'\nexport type { Operators } from './queries/operatorMap.js'\nexport { parseParams } from './queries/parseParams.js'\nexport { queryDrafts } from './queryDrafts.js'\nexport { buildDrizzleRelations } from './schema/buildDrizzleRelations.js'\nexport { buildRawSchema } from './schema/buildRawSchema.js'\nexport { beginTransaction } from './transactions/beginTransaction.js'\nexport { commitTransaction } from './transactions/commitTransaction.js'\nexport { rollbackTransaction } from './transactions/rollbackTransaction.js'\nexport type {\n BaseRawColumn,\n BlocksToJsonMigrator,\n BuildDrizzleTable,\n BuildQueryJoinAliases,\n ColumnToCodeConverter,\n CountDistinct,\n CreateJSONQueryArgs,\n DeleteWhere,\n DrizzleAdapter,\n DrizzleTransaction,\n DropDatabase,\n EnumRawColumn,\n Execute,\n GenericColumn,\n GenericColumns,\n GenericPgColumn,\n GenericRelation,\n GenericTable,\n IDType,\n Insert,\n IntegerRawColumn,\n Migration,\n PostgresDB,\n RawColumn,\n RawForeignKey,\n RawIndex,\n RawRelation,\n RawTable,\n RelationMap,\n RequireDrizzleKit,\n SetColumnID,\n SQLiteDB,\n TimestampRawColumn,\n TransactionPg,\n TransactionSQLite,\n UUIDRawColumn,\n VectorRawColumn,\n} from './types.js'\nexport { updateGlobal } from './updateGlobal.js'\nexport { updateGlobalVersion } from './updateGlobalVersion.js'\nexport { updateJobs } from './updateJobs.js'\nexport { updateMany } from './updateMany.js'\nexport { updateOne } from './updateOne.js'\nexport { updateVersion } from './updateVersion.js'\nexport { upsert } from './upsert.js'\nexport { upsertRow } from './upsertRow/index.js'\nexport {\n buildDynamicPredefinedBlocksToJsonMigration,\n createBlocksToJsonMigrator,\n getBlocksToJsonMigrator,\n} from './utilities/blocksToJsonMigrator.js'\nexport { buildCreateMigration } from './utilities/buildCreateMigration.js'\nexport { buildIndexName } from './utilities/buildIndexName.js'\nexport { createSchemaGenerator } from './utilities/createSchemaGenerator.js'\nexport { executeSchemaHooks } from './utilities/executeSchemaHooks.js'\nexport { extendDrizzleTable } from './utilities/extendDrizzleTable.js'\nexport { hasLocalesTable } from './utilities/hasLocalesTable.js'\nexport {
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { count } from './count.js'\nexport { countGlobalVersions } from './countGlobalVersions.js'\nexport { countVersions } from './countVersions.js'\nexport { create } from './create.js'\nexport { createGlobal } from './createGlobal.js'\nexport { createGlobalVersion } from './createGlobalVersion.js'\nexport { createTableName } from './createTableName.js'\nexport { createVersion } from './createVersion.js'\nexport { deleteMany } from './deleteMany.js'\nexport { deleteOne } from './deleteOne.js'\nexport { deleteVersions } from './deleteVersions.js'\nexport { destroy } from './destroy.js'\nexport { find } from './find.js'\nexport { findDistinct } from './findDistinct.js'\nexport { findGlobal } from './findGlobal.js'\nexport { findGlobalVersions } from './findGlobalVersions.js'\nexport { findOne } from './findOne.js'\nexport { findVersions } from './findVersions.js'\nexport { migrate } from './migrate.js'\nexport { migrateDown } from './migrateDown.js'\nexport { migrateFresh } from './migrateFresh.js'\nexport { migrateRefresh } from './migrateRefresh.js'\nexport { migrateReset } from './migrateReset.js'\nexport { migrateStatus } from './migrateStatus.js'\nexport { buildQuery } from './queries/buildQuery.js'\nexport { operatorMap } from './queries/operatorMap.js'\nexport type { Operators } from './queries/operatorMap.js'\nexport { parseParams } from './queries/parseParams.js'\nexport { queryDrafts } from './queryDrafts.js'\nexport { buildDrizzleRelations } from './schema/buildDrizzleRelations.js'\nexport { buildRawSchema } from './schema/buildRawSchema.js'\nexport { beginTransaction } from './transactions/beginTransaction.js'\nexport { commitTransaction } from './transactions/commitTransaction.js'\nexport { rollbackTransaction } from './transactions/rollbackTransaction.js'\nexport type {\n BaseRawColumn,\n BlocksToJsonMigrator,\n BuildDrizzleTable,\n BuildQueryJoinAliases,\n ColumnToCodeConverter,\n CountDistinct,\n CreateJSONQueryArgs,\n DeleteWhere,\n DrizzleAdapter,\n DrizzleTransaction,\n DropDatabase,\n EnumRawColumn,\n Execute,\n GenericColumn,\n GenericColumns,\n GenericPgColumn,\n GenericRelation,\n GenericTable,\n IDType,\n Insert,\n IntegerRawColumn,\n Migration,\n PostgresDB,\n RawColumn,\n RawForeignKey,\n RawIndex,\n RawRelation,\n RawTable,\n RelationMap,\n RequireDrizzleKit,\n SetColumnID,\n SQLiteDB,\n TimestampRawColumn,\n TransactionPg,\n TransactionSQLite,\n UUIDRawColumn,\n VectorRawColumn,\n} from './types.js'\nexport { updateGlobal } from './updateGlobal.js'\nexport { updateGlobalVersion } from './updateGlobalVersion.js'\nexport { updateJobs } from './updateJobs.js'\nexport { updateMany } from './updateMany.js'\nexport { updateOne } from './updateOne.js'\nexport { updateVersion } from './updateVersion.js'\nexport { upsert } from './upsert.js'\nexport { upsertRow } from './upsertRow/index.js'\nexport {\n buildDynamicPredefinedBlocksToJsonMigration,\n createBlocksToJsonMigrator,\n getBlocksToJsonMigrator,\n} from './utilities/blocksToJsonMigrator.js'\nexport { buildCreateMigration } from './utilities/buildCreateMigration.js'\nexport { buildIndexName } from './utilities/buildIndexName.js'\nexport { createSchemaGenerator } from './utilities/createSchemaGenerator.js'\nexport { executeSchemaHooks } from './utilities/executeSchemaHooks.js'\nexport { extendDrizzleTable } from './utilities/extendDrizzleTable.js'\nexport { hasLocalesTable } from './utilities/hasLocalesTable.js'\nexport { pushDevSchema } from './utilities/pushDevSchema.js'\nexport { validateExistingBlockIsIdentical } from './utilities/validateExistingBlockIsIdentical.js'\nimport { findMigrationDir as payloadFindMigrationDir } from 'payload'\n\n/**\n * @deprecated remove in 4.0\n * use\n * ```ts\n * import { findMigrationDir } from 'payload'\n * ```\n */\nexport const findMigrationDir = payloadFindMigrationDir\n"],"names":["count","countGlobalVersions","countVersions","create","createGlobal","createGlobalVersion","createTableName","createVersion","deleteMany","deleteOne","deleteVersions","destroy","find","findDistinct","findGlobal","findGlobalVersions","findOne","findVersions","migrate","migrateDown","migrateFresh","migrateRefresh","migrateReset","migrateStatus","buildQuery","operatorMap","parseParams","queryDrafts","buildDrizzleRelations","buildRawSchema","beginTransaction","commitTransaction","rollbackTransaction","updateGlobal","updateGlobalVersion","updateJobs","updateMany","updateOne","updateVersion","upsert","upsertRow","buildDynamicPredefinedBlocksToJsonMigration","createBlocksToJsonMigrator","getBlocksToJsonMigrator","buildCreateMigration","buildIndexName","createSchemaGenerator","executeSchemaHooks","extendDrizzleTable","hasLocalesTable","pushDevSchema","validateExist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Q,2BAA0B;AAC9D,SAASC,UAAU,QAAQ,kBAAiB;AAC5C,SAASC,UAAU,QAAQ,kBAAiB;AAC5C,SAASC,SAAS,QAAQ,iBAAgB;AAC1C,SAASC,aAAa,QAAQ,qBAAoB;AAClD,SAASC,MAAM,QAAQ,cAAa;AACpC,SAASC,SAAS,QAAQ,uBAAsB;AAChD,SACEC,2CAA2C,EAC3CC,0BAA0B,EAC1BC,uBAAuB,QAClB,sCAAqC;AAC5C,SAASC,oBAAoB,QAAQ,sCAAqC;AAC1E,SAASC,cAAc,QAAQ,gCAA+B;AAC9D,SAASC,qBAAqB,QAAQ,uCAAsC;AAC5E,SAASC,kBAAkB,QAAQ,oCAAmC;AACtE,SAASC,kBAAkB,QAAQ,oCAAmC;AACtE,SAASC,eAAe,QAAQ,iCAAgC;AAChE,SAASC,aAAa,QAAQ,+BAA8B;AAC5D,SAASC,gCAAgC,QAAQ,kDAAiD;AAClG,SAASC,oBAAoBC,uBAAuB,QAAQ,UAAS;AAErE;;;;;;CAMC,GACD,OAAO,MAAMD,mBAAmBC,wBAAuB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/drizzle",
|
|
3
|
-
"version": "4.0.0-internal.
|
|
3
|
+
"version": "4.0.0-internal.add4c47",
|
|
4
4
|
"description": "A library of shared functions used by different payload database adapters",
|
|
5
5
|
"homepage": "https://payloadcms.com",
|
|
6
6
|
"repository": {
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
"@types/pg": "8.20.0",
|
|
56
56
|
"@types/to-snake-case": "1.0.0",
|
|
57
57
|
"@payloadcms/eslint-config": "3.28.0",
|
|
58
|
-
"payload": "4.0.0-internal.
|
|
58
|
+
"payload": "4.0.0-internal.add4c47"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"payload": "4.0.0-internal.
|
|
61
|
+
"payload": "4.0.0-internal.add4c47"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "pnpm build:swc && pnpm build:types",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
type Args = {
|
|
2
|
-
db: any;
|
|
3
|
-
direction: 'down' | 'up';
|
|
4
|
-
newIndexName: string;
|
|
5
|
-
oldIndexName: string;
|
|
6
|
-
schemaName?: string;
|
|
7
|
-
sql: any;
|
|
8
|
-
tableName: string;
|
|
9
|
-
};
|
|
10
|
-
export declare function migratePostgresJobsProcessingLease({ db, direction, newIndexName, oldIndexName, schemaName, sql, tableName, }: Args): Promise<void>;
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/postgres/predefinedMigrations/jobs-processing-lease/index.ts"],"names":[],"mappings":"AAAA,KAAK,IAAI,GAAG;IACV,EAAE,EAAE,GAAG,CAAA;IACP,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,EAAE,GAAG,CAAA;IACR,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAID,wBAAsB,kCAAkC,CAAC,EACvD,EAAE,EACF,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,UAAqB,EACrB,GAAG,EACH,SAAS,GACV,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CA+BtB"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const quoteIdentifier = (identifier)=>`"${identifier.replaceAll('"', '""')}"`;
|
|
2
|
-
export async function migratePostgresJobsProcessingLease({ db, direction, newIndexName, oldIndexName, schemaName = 'public', sql, tableName }) {
|
|
3
|
-
const qualifiedTableName = `${quoteIdentifier(schemaName)}.${quoteIdentifier(tableName)}`;
|
|
4
|
-
const run = (statement)=>db.execute(sql.raw(statement));
|
|
5
|
-
if (direction === 'up') {
|
|
6
|
-
await run(`ALTER TABLE ${qualifiedTableName} ADD COLUMN "processing_until" timestamp(3) with time zone`);
|
|
7
|
-
await run(`UPDATE ${qualifiedTableName} SET "processing_until" = '1970-01-01 00:00:00+00' WHERE "processing" = true`);
|
|
8
|
-
await run(`DROP INDEX IF EXISTS ${quoteIdentifier(schemaName)}.${quoteIdentifier(oldIndexName)}`);
|
|
9
|
-
await run(`ALTER TABLE ${qualifiedTableName} DROP COLUMN "processing"`);
|
|
10
|
-
await run(`CREATE INDEX ${quoteIdentifier(newIndexName)} ON ${qualifiedTableName} USING btree ("processing_until")`);
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
await run(`ALTER TABLE ${qualifiedTableName} ADD COLUMN "processing" boolean DEFAULT false`);
|
|
14
|
-
await run(`UPDATE ${qualifiedTableName} SET "processing" = true WHERE "processing_until" IS NOT NULL`);
|
|
15
|
-
await run(`DROP INDEX IF EXISTS ${quoteIdentifier(schemaName)}.${quoteIdentifier(newIndexName)}`);
|
|
16
|
-
await run(`ALTER TABLE ${qualifiedTableName} DROP COLUMN "processing_until"`);
|
|
17
|
-
await run(`CREATE INDEX ${quoteIdentifier(oldIndexName)} ON ${qualifiedTableName} USING btree ("processing")`);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/postgres/predefinedMigrations/jobs-processing-lease/index.ts"],"sourcesContent":["type Args = {\n db: any\n direction: 'down' | 'up'\n newIndexName: string\n oldIndexName: string\n schemaName?: string\n sql: any\n tableName: string\n}\n\nconst quoteIdentifier = (identifier: string): string => `\"${identifier.replaceAll('\"', '\"\"')}\"`\n\nexport async function migratePostgresJobsProcessingLease({\n db,\n direction,\n newIndexName,\n oldIndexName,\n schemaName = 'public',\n sql,\n tableName,\n}: Args): Promise<void> {\n const qualifiedTableName = `${quoteIdentifier(schemaName)}.${quoteIdentifier(tableName)}`\n const run = (statement: string) => db.execute(sql.raw(statement))\n\n if (direction === 'up') {\n await run(\n `ALTER TABLE ${qualifiedTableName} ADD COLUMN \"processing_until\" timestamp(3) with time zone`,\n )\n await run(\n `UPDATE ${qualifiedTableName} SET \"processing_until\" = '1970-01-01 00:00:00+00' WHERE \"processing\" = true`,\n )\n await run(\n `DROP INDEX IF EXISTS ${quoteIdentifier(schemaName)}.${quoteIdentifier(oldIndexName)}`,\n )\n await run(`ALTER TABLE ${qualifiedTableName} DROP COLUMN \"processing\"`)\n await run(\n `CREATE INDEX ${quoteIdentifier(newIndexName)} ON ${qualifiedTableName} USING btree (\"processing_until\")`,\n )\n\n return\n }\n\n await run(`ALTER TABLE ${qualifiedTableName} ADD COLUMN \"processing\" boolean DEFAULT false`)\n await run(\n `UPDATE ${qualifiedTableName} SET \"processing\" = true WHERE \"processing_until\" IS NOT NULL`,\n )\n await run(`DROP INDEX IF EXISTS ${quoteIdentifier(schemaName)}.${quoteIdentifier(newIndexName)}`)\n await run(`ALTER TABLE ${qualifiedTableName} DROP COLUMN \"processing_until\"`)\n await run(\n `CREATE INDEX ${quoteIdentifier(oldIndexName)} ON ${qualifiedTableName} USING btree (\"processing\")`,\n )\n}\n"],"names":["quoteIdentifier","identifier","replaceAll","migratePostgresJobsProcessingLease","db","direction","newIndexName","oldIndexName","schemaName","sql","tableName","qualifiedTableName","run","statement","execute","raw"],"mappings":"AAUA,MAAMA,kBAAkB,CAACC,aAA+B,CAAC,CAAC,EAAEA,WAAWC,UAAU,CAAC,KAAK,MAAM,CAAC,CAAC;AAE/F,OAAO,eAAeC,mCAAmC,EACvDC,EAAE,EACFC,SAAS,EACTC,YAAY,EACZC,YAAY,EACZC,aAAa,QAAQ,EACrBC,GAAG,EACHC,SAAS,EACJ;IACL,MAAMC,qBAAqB,GAAGX,gBAAgBQ,YAAY,CAAC,EAAER,gBAAgBU,YAAY;IACzF,MAAME,MAAM,CAACC,YAAsBT,GAAGU,OAAO,CAACL,IAAIM,GAAG,CAACF;IAEtD,IAAIR,cAAc,MAAM;QACtB,MAAMO,IACJ,CAAC,YAAY,EAAED,mBAAmB,0DAA0D,CAAC;QAE/F,MAAMC,IACJ,CAAC,OAAO,EAAED,mBAAmB,4EAA4E,CAAC;QAE5G,MAAMC,IACJ,CAAC,qBAAqB,EAAEZ,gBAAgBQ,YAAY,CAAC,EAAER,gBAAgBO,eAAe;QAExF,MAAMK,IAAI,CAAC,YAAY,EAAED,mBAAmB,yBAAyB,CAAC;QACtE,MAAMC,IACJ,CAAC,aAAa,EAAEZ,gBAAgBM,cAAc,IAAI,EAAEK,mBAAmB,iCAAiC,CAAC;QAG3G;IACF;IAEA,MAAMC,IAAI,CAAC,YAAY,EAAED,mBAAmB,8CAA8C,CAAC;IAC3F,MAAMC,IACJ,CAAC,OAAO,EAAED,mBAAmB,6DAA6D,CAAC;IAE7F,MAAMC,IAAI,CAAC,qBAAqB,EAAEZ,gBAAgBQ,YAAY,CAAC,EAAER,gBAAgBM,eAAe;IAChG,MAAMM,IAAI,CAAC,YAAY,EAAED,mBAAmB,+BAA+B,CAAC;IAC5E,MAAMC,IACJ,CAAC,aAAa,EAAEZ,gBAAgBO,cAAc,IAAI,EAAEI,mBAAmB,2BAA2B,CAAC;AAEvG"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
type Args = {
|
|
2
|
-
db: any;
|
|
3
|
-
direction: 'down' | 'up';
|
|
4
|
-
newIndexName: string;
|
|
5
|
-
oldIndexName: string;
|
|
6
|
-
schemaName?: string;
|
|
7
|
-
sql: any;
|
|
8
|
-
tableName: string;
|
|
9
|
-
};
|
|
10
|
-
export declare function migrateSqliteJobsProcessingLease({ db, direction, newIndexName, oldIndexName, sql, tableName, }: Args): Promise<void>;
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/predefinedMigrations/jobs-processing-lease/index.ts"],"names":[],"mappings":"AAAA,KAAK,IAAI,GAAG;IACV,EAAE,EAAE,GAAG,CAAA;IACP,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,EAAE,GAAG,CAAA;IACR,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAID,wBAAsB,gCAAgC,CAAC,EACrD,EAAE,EACF,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,GAAG,EACH,SAAS,GACV,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBtB"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const quoteIdentifier = (identifier)=>`"${identifier.replaceAll('"', '""')}"`;
|
|
2
|
-
export async function migrateSqliteJobsProcessingLease({ db, direction, newIndexName, oldIndexName, sql, tableName }) {
|
|
3
|
-
const quotedTableName = quoteIdentifier(tableName);
|
|
4
|
-
const run = (statement)=>db.run(sql.raw(statement));
|
|
5
|
-
if (direction === 'up') {
|
|
6
|
-
await run(`ALTER TABLE ${quotedTableName} ADD COLUMN "processing_until" text`);
|
|
7
|
-
await run(`UPDATE ${quotedTableName} SET "processing_until" = '1970-01-01T00:00:00.000Z' WHERE "processing" = true`);
|
|
8
|
-
await run(`DROP INDEX IF EXISTS ${quoteIdentifier(oldIndexName)}`);
|
|
9
|
-
await run(`ALTER TABLE ${quotedTableName} DROP COLUMN "processing"`);
|
|
10
|
-
await run(`CREATE INDEX ${quoteIdentifier(newIndexName)} ON ${quotedTableName} ("processing_until")`);
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
await run(`ALTER TABLE ${quotedTableName} ADD COLUMN "processing" integer DEFAULT false`);
|
|
14
|
-
await run(`UPDATE ${quotedTableName} SET "processing" = true WHERE "processing_until" IS NOT NULL`);
|
|
15
|
-
await run(`DROP INDEX IF EXISTS ${quoteIdentifier(newIndexName)}`);
|
|
16
|
-
await run(`ALTER TABLE ${quotedTableName} DROP COLUMN "processing_until"`);
|
|
17
|
-
await run(`CREATE INDEX ${quoteIdentifier(oldIndexName)} ON ${quotedTableName} ("processing")`);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/sqlite/predefinedMigrations/jobs-processing-lease/index.ts"],"sourcesContent":["type Args = {\n db: any\n direction: 'down' | 'up'\n newIndexName: string\n oldIndexName: string\n schemaName?: string\n sql: any\n tableName: string\n}\n\nconst quoteIdentifier = (identifier: string): string => `\"${identifier.replaceAll('\"', '\"\"')}\"`\n\nexport async function migrateSqliteJobsProcessingLease({\n db,\n direction,\n newIndexName,\n oldIndexName,\n sql,\n tableName,\n}: Args): Promise<void> {\n const quotedTableName = quoteIdentifier(tableName)\n const run = (statement: string) => db.run(sql.raw(statement))\n\n if (direction === 'up') {\n await run(`ALTER TABLE ${quotedTableName} ADD COLUMN \"processing_until\" text`)\n await run(\n `UPDATE ${quotedTableName} SET \"processing_until\" = '1970-01-01T00:00:00.000Z' WHERE \"processing\" = true`,\n )\n await run(`DROP INDEX IF EXISTS ${quoteIdentifier(oldIndexName)}`)\n await run(`ALTER TABLE ${quotedTableName} DROP COLUMN \"processing\"`)\n await run(\n `CREATE INDEX ${quoteIdentifier(newIndexName)} ON ${quotedTableName} (\"processing_until\")`,\n )\n\n return\n }\n\n await run(`ALTER TABLE ${quotedTableName} ADD COLUMN \"processing\" integer DEFAULT false`)\n await run(\n `UPDATE ${quotedTableName} SET \"processing\" = true WHERE \"processing_until\" IS NOT NULL`,\n )\n await run(`DROP INDEX IF EXISTS ${quoteIdentifier(newIndexName)}`)\n await run(`ALTER TABLE ${quotedTableName} DROP COLUMN \"processing_until\"`)\n await run(`CREATE INDEX ${quoteIdentifier(oldIndexName)} ON ${quotedTableName} (\"processing\")`)\n}\n"],"names":["quoteIdentifier","identifier","replaceAll","migrateSqliteJobsProcessingLease","db","direction","newIndexName","oldIndexName","sql","tableName","quotedTableName","run","statement","raw"],"mappings":"AAUA,MAAMA,kBAAkB,CAACC,aAA+B,CAAC,CAAC,EAAEA,WAAWC,UAAU,CAAC,KAAK,MAAM,CAAC,CAAC;AAE/F,OAAO,eAAeC,iCAAiC,EACrDC,EAAE,EACFC,SAAS,EACTC,YAAY,EACZC,YAAY,EACZC,GAAG,EACHC,SAAS,EACJ;IACL,MAAMC,kBAAkBV,gBAAgBS;IACxC,MAAME,MAAM,CAACC,YAAsBR,GAAGO,GAAG,CAACH,IAAIK,GAAG,CAACD;IAElD,IAAIP,cAAc,MAAM;QACtB,MAAMM,IAAI,CAAC,YAAY,EAAED,gBAAgB,mCAAmC,CAAC;QAC7E,MAAMC,IACJ,CAAC,OAAO,EAAED,gBAAgB,8EAA8E,CAAC;QAE3G,MAAMC,IAAI,CAAC,qBAAqB,EAAEX,gBAAgBO,eAAe;QACjE,MAAMI,IAAI,CAAC,YAAY,EAAED,gBAAgB,yBAAyB,CAAC;QACnE,MAAMC,IACJ,CAAC,aAAa,EAAEX,gBAAgBM,cAAc,IAAI,EAAEI,gBAAgB,qBAAqB,CAAC;QAG5F;IACF;IAEA,MAAMC,IAAI,CAAC,YAAY,EAAED,gBAAgB,8CAA8C,CAAC;IACxF,MAAMC,IACJ,CAAC,OAAO,EAAED,gBAAgB,6DAA6D,CAAC;IAE1F,MAAMC,IAAI,CAAC,qBAAqB,EAAEX,gBAAgBM,eAAe;IACjE,MAAMK,IAAI,CAAC,YAAY,EAAED,gBAAgB,+BAA+B,CAAC;IACzE,MAAMC,IAAI,CAAC,aAAa,EAAEX,gBAAgBO,cAAc,IAAI,EAAEG,gBAAgB,eAAe,CAAC;AAChG"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { DynamicMigrationTemplate } from 'payload';
|
|
2
|
-
export declare const buildDynamicPredefinedJobsProcessingLeaseMigration: ({ dialect, packageName, }: {
|
|
3
|
-
dialect: 'postgres' | 'sqlite';
|
|
4
|
-
packageName: string;
|
|
5
|
-
}) => DynamicMigrationTemplate;
|
|
6
|
-
//# sourceMappingURL=jobsProcessingLeaseMigration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jobsProcessingLeaseMigration.d.ts","sourceRoot":"","sources":["../../src/utilities/jobsProcessingLeaseMigration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAqEvD,eAAO,MAAM,kDAAkD,8BAG5D;IACD,OAAO,EAAE,UAAU,GAAG,QAAQ,CAAA;IAC9B,WAAW,EAAE,MAAM,CAAA;CACpB,KAAG,wBAwCH,CAAA"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { readdirSync, readFileSync, writeFileSync } from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import toSnakeCase from 'to-snake-case';
|
|
4
|
-
const getDefaultIndexName = (name)=>{
|
|
5
|
-
const suffix = '_idx';
|
|
6
|
-
return `${name.slice(0, 60 - suffix.length)}${suffix}`;
|
|
7
|
-
};
|
|
8
|
-
const getIndexName = ({ fallbackFieldName, indexes, on, tableName })=>{
|
|
9
|
-
const matchingIndex = Object.values(indexes ?? {}).find((index)=>index.on === on);
|
|
10
|
-
return matchingIndex?.name ?? getDefaultIndexName(`${tableName}_${fallbackFieldName}`);
|
|
11
|
-
};
|
|
12
|
-
const getLegacyProcessingIndexName = ({ filePath, tableName })=>{
|
|
13
|
-
const latestSnapshotFile = readdirSync(path.dirname(filePath)).filter((file)=>file.endsWith('.json')).sort().reverse()[0];
|
|
14
|
-
if (latestSnapshotFile) {
|
|
15
|
-
const snapshot = JSON.parse(readFileSync(path.join(path.dirname(filePath), latestSnapshotFile), 'utf8'));
|
|
16
|
-
const table = Object.values(snapshot.tables ?? {}).find(({ name })=>name === tableName);
|
|
17
|
-
const processingIndex = Object.values(table?.indexes ?? {}).find((index)=>index.columns?.some(({ expression })=>expression === 'processing'));
|
|
18
|
-
if (processingIndex?.name) {
|
|
19
|
-
return processingIndex.name;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return getDefaultIndexName(`${tableName}_processing`);
|
|
23
|
-
};
|
|
24
|
-
export const buildDynamicPredefinedJobsProcessingLeaseMigration = ({ dialect, packageName })=>{
|
|
25
|
-
return async ({ filePath, payload })=>{
|
|
26
|
-
const adapter = payload.db;
|
|
27
|
-
const tableName = adapter.tableNameMap.get(toSnakeCase('payload-jobs'));
|
|
28
|
-
if (!tableName) {
|
|
29
|
-
throw new Error('Could not find the payload-jobs database table');
|
|
30
|
-
}
|
|
31
|
-
const rawTable = adapter.rawTables[tableName];
|
|
32
|
-
const newIndexName = getIndexName({
|
|
33
|
-
fallbackFieldName: 'processing_until',
|
|
34
|
-
indexes: rawTable?.indexes,
|
|
35
|
-
on: 'processingUntil',
|
|
36
|
-
tableName
|
|
37
|
-
});
|
|
38
|
-
const oldIndexName = getLegacyProcessingIndexName({
|
|
39
|
-
filePath,
|
|
40
|
-
tableName
|
|
41
|
-
});
|
|
42
|
-
const schemaName = dialect === 'postgres' ? adapter.schemaName ?? 'public' : undefined;
|
|
43
|
-
const drizzleSnapshot = await adapter.requireDrizzleKit().generateDrizzleJson(adapter.schema);
|
|
44
|
-
writeFileSync(`${filePath}.json`, JSON.stringify(drizzleSnapshot, null, 2));
|
|
45
|
-
const sharedArgs = `
|
|
46
|
-
db,
|
|
47
|
-
newIndexName: ${JSON.stringify(newIndexName)},
|
|
48
|
-
oldIndexName: ${JSON.stringify(oldIndexName)},
|
|
49
|
-
schemaName: ${JSON.stringify(schemaName)},
|
|
50
|
-
sql,
|
|
51
|
-
tableName: ${JSON.stringify(tableName)},`;
|
|
52
|
-
return {
|
|
53
|
-
downSQL: `await migrateJobsProcessingLease({${sharedArgs}
|
|
54
|
-
direction: 'down',
|
|
55
|
-
})`,
|
|
56
|
-
imports: `import { migrateJobsProcessingLease } from '${packageName}/migration-utils'`,
|
|
57
|
-
upSQL: `await migrateJobsProcessingLease({${sharedArgs}
|
|
58
|
-
direction: 'up',
|
|
59
|
-
})`
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
//# sourceMappingURL=jobsProcessingLeaseMigration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utilities/jobsProcessingLeaseMigration.ts"],"sourcesContent":["import type { DynamicMigrationTemplate } from 'payload'\n\nimport { readdirSync, readFileSync, writeFileSync } from 'fs'\nimport path from 'path'\nimport toSnakeCase from 'to-snake-case'\n\nimport type { DrizzleAdapter, RawIndex } from '../types.js'\n\ntype SnapshotIndex = {\n columns?: { expression?: string }[]\n name?: string\n}\n\ntype SnapshotTable = {\n indexes?: Record<string, SnapshotIndex>\n name?: string\n}\n\nconst getDefaultIndexName = (name: string): string => {\n const suffix = '_idx'\n\n return `${name.slice(0, 60 - suffix.length)}${suffix}`\n}\n\nconst getIndexName = ({\n fallbackFieldName,\n indexes,\n on,\n tableName,\n}: {\n fallbackFieldName: string\n indexes?: Record<string, RawIndex>\n on: string\n tableName: string\n}): string => {\n const matchingIndex = Object.values(indexes ?? {}).find((index) => index.on === on)\n\n return matchingIndex?.name ?? getDefaultIndexName(`${tableName}_${fallbackFieldName}`)\n}\n\nconst getLegacyProcessingIndexName = ({\n filePath,\n tableName,\n}: {\n filePath: string\n tableName: string\n}): string => {\n const latestSnapshotFile = readdirSync(path.dirname(filePath))\n .filter((file) => file.endsWith('.json'))\n .sort()\n .reverse()[0]\n\n if (latestSnapshotFile) {\n const snapshot = JSON.parse(\n readFileSync(path.join(path.dirname(filePath), latestSnapshotFile), 'utf8'),\n ) as { tables?: Record<string, SnapshotTable> }\n const table = Object.values(snapshot.tables ?? {}).find(({ name }) => name === tableName)\n const processingIndex = Object.values(table?.indexes ?? {}).find((index) =>\n index.columns?.some(({ expression }) => expression === 'processing'),\n )\n\n if (processingIndex?.name) {\n return processingIndex.name\n }\n }\n\n return getDefaultIndexName(`${tableName}_processing`)\n}\n\nexport const buildDynamicPredefinedJobsProcessingLeaseMigration = ({\n dialect,\n packageName,\n}: {\n dialect: 'postgres' | 'sqlite'\n packageName: string\n}): DynamicMigrationTemplate => {\n return async ({ filePath, payload }) => {\n const adapter = payload.db as DrizzleAdapter\n const tableName = adapter.tableNameMap.get(toSnakeCase('payload-jobs'))\n\n if (!tableName) {\n throw new Error('Could not find the payload-jobs database table')\n }\n\n const rawTable = adapter.rawTables[tableName]\n const newIndexName = getIndexName({\n fallbackFieldName: 'processing_until',\n indexes: rawTable?.indexes,\n on: 'processingUntil',\n tableName,\n })\n const oldIndexName = getLegacyProcessingIndexName({ filePath, tableName })\n const schemaName = dialect === 'postgres' ? (adapter.schemaName ?? 'public') : undefined\n const drizzleSnapshot = await adapter.requireDrizzleKit().generateDrizzleJson(adapter.schema)\n\n writeFileSync(`${filePath}.json`, JSON.stringify(drizzleSnapshot, null, 2))\n\n const sharedArgs = `\n db,\n newIndexName: ${JSON.stringify(newIndexName)},\n oldIndexName: ${JSON.stringify(oldIndexName)},\n schemaName: ${JSON.stringify(schemaName)},\n sql,\n tableName: ${JSON.stringify(tableName)},`\n\n return {\n downSQL: `await migrateJobsProcessingLease({${sharedArgs}\n direction: 'down',\n })`,\n imports: `import { migrateJobsProcessingLease } from '${packageName}/migration-utils'`,\n upSQL: `await migrateJobsProcessingLease({${sharedArgs}\n direction: 'up',\n })`,\n }\n }\n}\n"],"names":["readdirSync","readFileSync","writeFileSync","path","toSnakeCase","getDefaultIndexName","name","suffix","slice","length","getIndexName","fallbackFieldName","indexes","on","tableName","matchingIndex","Object","values","find","index","getLegacyProcessingIndexName","filePath","latestSnapshotFile","dirname","filter","file","endsWith","sort","reverse","snapshot","JSON","parse","join","table","tables","processingIndex","columns","some","expression","buildDynamicPredefinedJobsProcessingLeaseMigration","dialect","packageName","payload","adapter","db","tableNameMap","get","Error","rawTable","rawTables","newIndexName","oldIndexName","schemaName","undefined","drizzleSnapshot","requireDrizzleKit","generateDrizzleJson","schema","stringify","sharedArgs","downSQL","imports","upSQL"],"mappings":"AAEA,SAASA,WAAW,EAAEC,YAAY,EAAEC,aAAa,QAAQ,KAAI;AAC7D,OAAOC,UAAU,OAAM;AACvB,OAAOC,iBAAiB,gBAAe;AAcvC,MAAMC,sBAAsB,CAACC;IAC3B,MAAMC,SAAS;IAEf,OAAO,GAAGD,KAAKE,KAAK,CAAC,GAAG,KAAKD,OAAOE,MAAM,IAAIF,QAAQ;AACxD;AAEA,MAAMG,eAAe,CAAC,EACpBC,iBAAiB,EACjBC,OAAO,EACPC,EAAE,EACFC,SAAS,EAMV;IACC,MAAMC,gBAAgBC,OAAOC,MAAM,CAACL,WAAW,CAAC,GAAGM,IAAI,CAAC,CAACC,QAAUA,MAAMN,EAAE,KAAKA;IAEhF,OAAOE,eAAeT,QAAQD,oBAAoB,GAAGS,UAAU,CAAC,EAAEH,mBAAmB;AACvF;AAEA,MAAMS,+BAA+B,CAAC,EACpCC,QAAQ,EACRP,SAAS,EAIV;IACC,MAAMQ,qBAAqBtB,YAAYG,KAAKoB,OAAO,CAACF,WACjDG,MAAM,CAAC,CAACC,OAASA,KAAKC,QAAQ,CAAC,UAC/BC,IAAI,GACJC,OAAO,EAAE,CAAC,EAAE;IAEf,IAAIN,oBAAoB;QACtB,MAAMO,WAAWC,KAAKC,KAAK,CACzB9B,aAAaE,KAAK6B,IAAI,CAAC7B,KAAKoB,OAAO,CAACF,WAAWC,qBAAqB;QAEtE,MAAMW,QAAQjB,OAAOC,MAAM,CAACY,SAASK,MAAM,IAAI,CAAC,GAAGhB,IAAI,CAAC,CAAC,EAAEZ,IAAI,EAAE,GAAKA,SAASQ;QAC/E,MAAMqB,kBAAkBnB,OAAOC,MAAM,CAACgB,OAAOrB,WAAW,CAAC,GAAGM,IAAI,CAAC,CAACC,QAChEA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,CAAC,kCAAkC,EAAEH,WAAW;;IAEzD,CAAC;QACD;IACF;AACF,EAAC"}
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { createClient } from '@libsql/client';
|
|
2
|
-
import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'fs';
|
|
3
|
-
import { tmpdir } from 'os';
|
|
4
|
-
import path from 'path';
|
|
5
|
-
import { afterEach, describe, expect, it, vi } from 'vitest';
|
|
6
|
-
import { migratePostgresJobsProcessingLease } from '../postgres/predefinedMigrations/jobs-processing-lease/index.js';
|
|
7
|
-
import { migrateSqliteJobsProcessingLease } from '../sqlite/predefinedMigrations/jobs-processing-lease/index.js';
|
|
8
|
-
import { buildDynamicPredefinedJobsProcessingLeaseMigration } from './jobsProcessingLeaseMigration.js';
|
|
9
|
-
describe('jobs processing lease predefined migration', ()=>{
|
|
10
|
-
let client;
|
|
11
|
-
const temporaryDirectories = [];
|
|
12
|
-
afterEach(()=>{
|
|
13
|
-
client?.close();
|
|
14
|
-
client = undefined;
|
|
15
|
-
for (const directory of temporaryDirectories){
|
|
16
|
-
rmSync(directory, {
|
|
17
|
-
force: true,
|
|
18
|
-
recursive: true
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
temporaryDirectories.length = 0;
|
|
22
|
-
});
|
|
23
|
-
it('should migrate SQLite job data up and down', async ()=>{
|
|
24
|
-
client = createClient({
|
|
25
|
-
url: ':memory:'
|
|
26
|
-
});
|
|
27
|
-
await client.execute('CREATE TABLE "custom_jobs" ("id" integer primary key, "processing" integer DEFAULT false)');
|
|
28
|
-
await client.execute('CREATE INDEX "custom_jobs_processing_idx" ON "custom_jobs" ("processing")');
|
|
29
|
-
await client.execute('INSERT INTO "custom_jobs" ("id", "processing") VALUES (1, true), (2, false)');
|
|
30
|
-
const db = {
|
|
31
|
-
run: (statement)=>client.execute(statement)
|
|
32
|
-
};
|
|
33
|
-
const sql = {
|
|
34
|
-
raw: (statement)=>statement
|
|
35
|
-
};
|
|
36
|
-
await migrateSqliteJobsProcessingLease({
|
|
37
|
-
db,
|
|
38
|
-
direction: 'up',
|
|
39
|
-
newIndexName: 'custom_jobs_processing_until_idx',
|
|
40
|
-
oldIndexName: 'custom_jobs_processing_idx',
|
|
41
|
-
sql,
|
|
42
|
-
tableName: 'custom_jobs'
|
|
43
|
-
});
|
|
44
|
-
const migratedJobs = await client.execute('SELECT "id", "processing_until" FROM "custom_jobs" ORDER BY "id"');
|
|
45
|
-
expect(migratedJobs.rows).toEqual([
|
|
46
|
-
{
|
|
47
|
-
id: 1,
|
|
48
|
-
processing_until: '1970-01-01T00:00:00.000Z'
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
id: 2,
|
|
52
|
-
processing_until: null
|
|
53
|
-
}
|
|
54
|
-
]);
|
|
55
|
-
await migrateSqliteJobsProcessingLease({
|
|
56
|
-
db,
|
|
57
|
-
direction: 'down',
|
|
58
|
-
newIndexName: 'custom_jobs_processing_until_idx',
|
|
59
|
-
oldIndexName: 'custom_jobs_processing_idx',
|
|
60
|
-
sql,
|
|
61
|
-
tableName: 'custom_jobs'
|
|
62
|
-
});
|
|
63
|
-
const restoredJobs = await client.execute('SELECT "id", "processing" FROM "custom_jobs" ORDER BY "id"');
|
|
64
|
-
expect(restoredJobs.rows).toEqual([
|
|
65
|
-
{
|
|
66
|
-
id: 1,
|
|
67
|
-
processing: 1
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
id: 2,
|
|
71
|
-
processing: 0
|
|
72
|
-
}
|
|
73
|
-
]);
|
|
74
|
-
});
|
|
75
|
-
it('should produce PostgreSQL statements with quoted custom names', async ()=>{
|
|
76
|
-
const execute = vi.fn().mockResolvedValue(undefined);
|
|
77
|
-
await migratePostgresJobsProcessingLease({
|
|
78
|
-
db: {
|
|
79
|
-
execute
|
|
80
|
-
},
|
|
81
|
-
direction: 'up',
|
|
82
|
-
newIndexName: 'custom_jobs_processing_until_idx',
|
|
83
|
-
oldIndexName: 'custom_jobs_processing_idx',
|
|
84
|
-
schemaName: 'custom_schema',
|
|
85
|
-
sql: {
|
|
86
|
-
raw: (statement)=>statement
|
|
87
|
-
},
|
|
88
|
-
tableName: 'custom_jobs'
|
|
89
|
-
});
|
|
90
|
-
expect(execute.mock.calls.map(([statement])=>statement)).toEqual([
|
|
91
|
-
'ALTER TABLE "custom_schema"."custom_jobs" ADD COLUMN "processing_until" timestamp(3) with time zone',
|
|
92
|
-
'UPDATE "custom_schema"."custom_jobs" SET "processing_until" = \'1970-01-01 00:00:00+00\' WHERE "processing" = true',
|
|
93
|
-
'DROP INDEX IF EXISTS "custom_schema"."custom_jobs_processing_idx"',
|
|
94
|
-
'ALTER TABLE "custom_schema"."custom_jobs" DROP COLUMN "processing"',
|
|
95
|
-
'CREATE INDEX "custom_jobs_processing_until_idx" ON "custom_schema"."custom_jobs" USING btree ("processing_until")'
|
|
96
|
-
]);
|
|
97
|
-
});
|
|
98
|
-
it('should write a Drizzle snapshot and generate adapter-specific migration code', async ()=>{
|
|
99
|
-
const temporaryDirectory = mkdtempSync(path.join(tmpdir(), 'payload-jobs-migration-'));
|
|
100
|
-
temporaryDirectories.push(temporaryDirectory);
|
|
101
|
-
const filePath = path.join(temporaryDirectory, 'migration');
|
|
102
|
-
writeFileSync(path.join(temporaryDirectory, 'previous.json'), JSON.stringify({
|
|
103
|
-
tables: {
|
|
104
|
-
jobs: {
|
|
105
|
-
indexes: {
|
|
106
|
-
legacy: {
|
|
107
|
-
columns: [
|
|
108
|
-
{
|
|
109
|
-
expression: 'processing'
|
|
110
|
-
}
|
|
111
|
-
],
|
|
112
|
-
name: 'legacy_processing_index'
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
name: 'custom_jobs'
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}));
|
|
119
|
-
const payload = {
|
|
120
|
-
db: {
|
|
121
|
-
rawTables: {
|
|
122
|
-
custom_jobs: {
|
|
123
|
-
indexes: {
|
|
124
|
-
processingUntil: {
|
|
125
|
-
name: 'custom_jobs_processing_until_idx',
|
|
126
|
-
on: 'processingUntil'
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
requireDrizzleKit: ()=>({
|
|
132
|
-
generateDrizzleJson: vi.fn().mockResolvedValue({
|
|
133
|
-
version: 'test-snapshot'
|
|
134
|
-
})
|
|
135
|
-
}),
|
|
136
|
-
schema: {},
|
|
137
|
-
schemaName: 'custom_schema',
|
|
138
|
-
tableNameMap: new Map([
|
|
139
|
-
[
|
|
140
|
-
'payload_jobs',
|
|
141
|
-
'custom_jobs'
|
|
142
|
-
]
|
|
143
|
-
])
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
const dynamic = buildDynamicPredefinedJobsProcessingLeaseMigration({
|
|
147
|
-
dialect: 'postgres',
|
|
148
|
-
packageName: '@payloadcms/db-postgres'
|
|
149
|
-
});
|
|
150
|
-
const migration = await dynamic({
|
|
151
|
-
filePath,
|
|
152
|
-
payload
|
|
153
|
-
});
|
|
154
|
-
expect(existsSync(`${filePath}.json`)).toBe(true);
|
|
155
|
-
expect(JSON.parse(readFileSync(`${filePath}.json`, 'utf8'))).toEqual({
|
|
156
|
-
version: 'test-snapshot'
|
|
157
|
-
});
|
|
158
|
-
expect(migration.imports).toContain('@payloadcms/db-postgres/migration-utils');
|
|
159
|
-
expect(migration.upSQL).toContain("direction: 'up'");
|
|
160
|
-
expect(migration.upSQL).toContain('custom_jobs_processing_until_idx');
|
|
161
|
-
expect(migration.upSQL).toContain('legacy_processing_index');
|
|
162
|
-
expect(migration.downSQL).toContain("direction: 'down'");
|
|
163
|
-
});
|
|
164
|
-
});
|
|
165
|
-
|
|
166
|
-
//# sourceMappingURL=jobsProcessingLeaseMigration.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utilities/jobsProcessingLeaseMigration.spec.ts"],"sourcesContent":["import type { Client } from '@libsql/client'\nimport type { Payload } from 'payload'\n\nimport { createClient } from '@libsql/client'\nimport { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'fs'\nimport { tmpdir } from 'os'\nimport path from 'path'\nimport { afterEach, describe, expect, it, vi } from 'vitest'\n\nimport { migratePostgresJobsProcessingLease } from '../postgres/predefinedMigrations/jobs-processing-lease/index.js'\nimport { migrateSqliteJobsProcessingLease } from '../sqlite/predefinedMigrations/jobs-processing-lease/index.js'\nimport { buildDynamicPredefinedJobsProcessingLeaseMigration } from './jobsProcessingLeaseMigration.js'\n\ndescribe('jobs processing lease predefined migration', () => {\n let client: Client | undefined\n const temporaryDirectories: string[] = []\n\n afterEach(() => {\n client?.close()\n client = undefined\n\n for (const directory of temporaryDirectories) {\n rmSync(directory, { force: true, recursive: true })\n }\n temporaryDirectories.length = 0\n })\n\n it('should migrate SQLite job data up and down', async () => {\n client = createClient({ url: ':memory:' })\n await client.execute(\n 'CREATE TABLE \"custom_jobs\" (\"id\" integer primary key, \"processing\" integer DEFAULT false)',\n )\n await client.execute(\n 'CREATE INDEX \"custom_jobs_processing_idx\" ON \"custom_jobs\" (\"processing\")',\n )\n await client.execute(\n 'INSERT INTO \"custom_jobs\" (\"id\", \"processing\") VALUES (1, true), (2, false)',\n )\n\n const db = { run: (statement: unknown) => client!.execute(statement as string) }\n const sql = { raw: (statement: string) => statement }\n\n await migrateSqliteJobsProcessingLease({\n db,\n direction: 'up',\n newIndexName: 'custom_jobs_processing_until_idx',\n oldIndexName: 'custom_jobs_processing_idx',\n sql,\n tableName: 'custom_jobs',\n })\n\n const migratedJobs = await client.execute(\n 'SELECT \"id\", \"processing_until\" FROM \"custom_jobs\" ORDER BY \"id\"',\n )\n expect(migratedJobs.rows).toEqual([\n { id: 1, processing_until: '1970-01-01T00:00:00.000Z' },\n { id: 2, processing_until: null },\n ])\n\n await migrateSqliteJobsProcessingLease({\n db,\n direction: 'down',\n newIndexName: 'custom_jobs_processing_until_idx',\n oldIndexName: 'custom_jobs_processing_idx',\n sql,\n tableName: 'custom_jobs',\n })\n\n const restoredJobs = await client.execute(\n 'SELECT \"id\", \"processing\" FROM \"custom_jobs\" ORDER BY \"id\"',\n )\n expect(restoredJobs.rows).toEqual([\n { id: 1, processing: 1 },\n { id: 2, processing: 0 },\n ])\n })\n\n it('should produce PostgreSQL statements with quoted custom names', async () => {\n const execute = vi.fn().mockResolvedValue(undefined)\n\n await migratePostgresJobsProcessingLease({\n db: { execute },\n direction: 'up',\n newIndexName: 'custom_jobs_processing_until_idx',\n oldIndexName: 'custom_jobs_processing_idx',\n schemaName: 'custom_schema',\n sql: { raw: (statement: string) => statement },\n tableName: 'custom_jobs',\n })\n\n expect(execute.mock.calls.map(([statement]) => statement)).toEqual([\n 'ALTER TABLE \"custom_schema\".\"custom_jobs\" ADD COLUMN \"processing_until\" timestamp(3) with time zone',\n 'UPDATE \"custom_schema\".\"custom_jobs\" SET \"processing_until\" = \\'1970-01-01 00:00:00+00\\' WHERE \"processing\" = true',\n 'DROP INDEX IF EXISTS \"custom_schema\".\"custom_jobs_processing_idx\"',\n 'ALTER TABLE \"custom_schema\".\"custom_jobs\" DROP COLUMN \"processing\"',\n 'CREATE INDEX \"custom_jobs_processing_until_idx\" ON \"custom_schema\".\"custom_jobs\" USING btree (\"processing_until\")',\n ])\n })\n\n it('should write a Drizzle snapshot and generate adapter-specific migration code', async () => {\n const temporaryDirectory = mkdtempSync(path.join(tmpdir(), 'payload-jobs-migration-'))\n temporaryDirectories.push(temporaryDirectory)\n const filePath = path.join(temporaryDirectory, 'migration')\n writeFileSync(\n path.join(temporaryDirectory, 'previous.json'),\n JSON.stringify({\n tables: {\n jobs: {\n indexes: {\n legacy: {\n columns: [{ expression: 'processing' }],\n name: 'legacy_processing_index',\n },\n },\n name: 'custom_jobs',\n },\n },\n }),\n )\n const payload = {\n db: {\n rawTables: {\n custom_jobs: {\n indexes: {\n processingUntil: {\n name: 'custom_jobs_processing_until_idx',\n on: 'processingUntil',\n },\n },\n },\n },\n requireDrizzleKit: () => ({\n generateDrizzleJson: vi.fn().mockResolvedValue({ version: 'test-snapshot' }),\n }),\n schema: {},\n schemaName: 'custom_schema',\n tableNameMap: new Map([['payload_jobs', 'custom_jobs']]),\n },\n } as unknown as Payload\n\n const dynamic = buildDynamicPredefinedJobsProcessingLeaseMigration({\n dialect: 'postgres',\n packageName: '@payloadcms/db-postgres',\n })\n const migration = await dynamic({ filePath, payload })\n\n expect(existsSync(`${filePath}.json`)).toBe(true)\n expect(JSON.parse(readFileSync(`${filePath}.json`, 'utf8'))).toEqual({\n version: 'test-snapshot',\n })\n expect(migration.imports).toContain('@payloadcms/db-postgres/migration-utils')\n expect(migration.upSQL).toContain(\"direction: 'up'\")\n expect(migration.upSQL).toContain('custom_jobs_processing_until_idx')\n expect(migration.upSQL).toContain('legacy_processing_index')\n expect(migration.downSQL).toContain(\"direction: 'down'\")\n })\n})\n"],"names":["createClient","existsSync","mkdtempSync","readFileSync","rmSync","writeFileSync","tmpdir","path","afterEach","describe","expect","it","vi","migratePostgresJobsProcessingLease","migrateSqliteJobsProcessingLease","buildDynamicPredefinedJobsProcessingLeaseMigration","client","temporaryDirectories","close","undefined","directory","force","recursive","length","url","execute","db","run","statement","sql","raw","direction","newIndexName","oldIndexName","tableName","migratedJobs","rows","toEqual","id","processing_until","restoredJobs","processing","fn","mockResolvedValue","schemaName","mock","calls","map","temporaryDirectory","join","push","filePath","JSON","stringify","tables","jobs","indexes","legacy","columns","expression","name","payload","rawTables","custom_jobs","processingUntil","on","requireDrizzleKit","generateDrizzleJson","version","schema","tableNameMap","Map","dynamic","dialect","packageName","migration","toBe","parse","imports","toContain","upSQL","downSQL"],"mappings":"AAGA,SAASA,YAAY,QAAQ,iBAAgB;AAC7C,SAASC,UAAU,EAAEC,WAAW,EAAEC,YAAY,EAAEC,MAAM,EAAEC,aAAa,QAAQ,KAAI;AACjF,SAASC,MAAM,QAAQ,KAAI;AAC3B,OAAOC,UAAU,OAAM;AACvB,SAASC,SAAS,EAAEC,QAAQ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