mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
fix(plugin-workflow-manual): fix migration version (#6430)
This commit is contained in:
parent
ddbb62ed49
commit
9a2b877a97
@ -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,
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user