fix(plugin-workflow-manual): fix migration version (#6430)

This commit is contained in:
Junyi 2025-03-12 15:14:00 +08:00 committed by GitHub
parent ddbb62ed49
commit 9a2b877a97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 5 deletions

View File

@ -7,13 +7,11 @@
* For more information, please refer to: https://www.nocobase.com/agreement.
*/
import { createMockServer, MockServer } from '@nocobase/test';
import { createMockServer } from '@nocobase/test';
import { describe, test } from 'vitest';
import workflowManualTasks from '../../collections/workflowManualTasks';
import Migration from '../../migrations/20250312100512-change-table-name';
const pgOnly = (schema) => (schema && process.env.DB_DIALECT == 'postgres' ? it : it.skip);
const matrix: [string, string][] = [
// schema, tablePrefix
[undefined, undefined],
@ -24,7 +22,10 @@ const matrix: [string, string][] = [
function matrixTest() {
for (const [schema, tablePrefix] of matrix) {
pgOnly(schema)(`schema: ${schema}, tablePrefix: ${tablePrefix}`, async () => {
if (schema && process.env.DB_DIALECT !== 'postgres') {
continue;
}
test(`schema: ${schema}, tablePrefix: ${tablePrefix}`, async () => {
const app = await createMockServer({
database: {
schema,

View File

@ -10,7 +10,7 @@
import { Migration } from '@nocobase/server';
export default class extends Migration {
appVersion = '<1.6.2';
appVersion = '<1.7.0';
on = 'beforeLoad';
async up() {
const { db } = this.context;