diff --git a/.env.example b/.env.example index 52fdb02c5f..d7da084a66 100644 --- a/.env.example +++ b/.env.example @@ -23,6 +23,7 @@ PROXY_TARGET_URL= DB_DIALECT=sqlite DB_STORAGE=storage/db/nocobase.sqlite +DB_TABLE_PREFIX= # DB_HOST=localhost # DB_PORT=5432 # DB_DATABASE=postgres diff --git a/.github/workflows/nocobase-test.yml b/.github/workflows/nocobase-test.yml index ed1e221e78..0c31ace5c9 100644 --- a/.github/workflows/nocobase-test.yml +++ b/.github/workflows/nocobase-test.yml @@ -12,11 +12,10 @@ on: - 'packages/**' jobs: - sqlite-test: + build-test: strategy: matrix: node_version: ['16', '18'] - underscored: [true, false] runs-on: ubuntu-latest container: node:${{ matrix.node_version }} steps: @@ -28,6 +27,23 @@ jobs: cache: 'yarn' - run: yarn install - run: yarn build + + sqlite-test: + strategy: + matrix: + node_version: ['18'] + underscored: [true, false] + runs-on: ubuntu-latest + container: node:${{ matrix.node_version }} + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node_version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node_version }} + cache: 'yarn' + - run: yarn install + # - run: yarn build - name: Test with Sqlite run: yarn test env: @@ -38,7 +54,7 @@ jobs: postgres-test: strategy: matrix: - node_version: ['16', '18'] + node_version: ['18'] underscored: [true, false] schema: [public, nocobase] runs-on: ubuntu-latest @@ -66,7 +82,7 @@ jobs: node-version: ${{ matrix.node_version }} cache: 'yarn' - run: yarn install - - run: yarn build + # - run: yarn build - name: Test with postgres run: yarn test env: @@ -82,7 +98,7 @@ jobs: mysql-test: strategy: matrix: - node_version: ['16', '18'] + node_version: ['18'] underscored: [true, false] runs-on: ubuntu-latest container: node:${{ matrix.node_version }} @@ -101,7 +117,7 @@ jobs: node-version: ${{ matrix.node_version }} cache: 'yarn' - run: yarn install - - run: yarn build + # - run: yarn build - name: Test with MySQL run: yarn test env: diff --git a/packages/plugins/workflow/src/server/migrations/20230203162901-jsonb-to-json.ts b/packages/plugins/workflow/src/server/migrations/20230203162902-jsonb-to-json.ts similarity index 51% rename from packages/plugins/workflow/src/server/migrations/20230203162901-jsonb-to-json.ts rename to packages/plugins/workflow/src/server/migrations/20230203162902-jsonb-to-json.ts index 3c4825004d..c692b43c1b 100644 --- a/packages/plugins/workflow/src/server/migrations/20230203162901-jsonb-to-json.ts +++ b/packages/plugins/workflow/src/server/migrations/20230203162902-jsonb-to-json.ts @@ -4,23 +4,24 @@ import { Migration } from '@nocobase/server'; export default class extends Migration { async up() { - const match = await this.app.version.satisfies('<=0.9.0-alpha.2'); + const match = await this.app.version.satisfies('<0.9.0-alpha.3'); if (!match) { return; } const { context: { sequelize, queryInterface } } = arguments[0]; + const { db } = this.app; await sequelize.transaction(async (transaction) => { - await queryInterface.changeColumn('workflows', 'config', { + await queryInterface.changeColumn(db.getCollection('workflows').model.getTableName(), 'config', { type: DataTypes.JSON }, { transaction }); - await queryInterface.changeColumn('flow_nodes', 'config', { + await queryInterface.changeColumn(db.getCollection('flow_nodes').model.getTableName(), 'config', { type: DataTypes.JSON }, { transaction }); - await queryInterface.changeColumn('executions', 'context', { + await queryInterface.changeColumn(db.getCollection('executions').model.getTableName(), 'context', { type: DataTypes.JSON }, { transaction }); - await queryInterface.changeColumn('jobs', 'result', { + await queryInterface.changeColumn(db.getCollection('jobs').model.getTableName(), 'result', { type: DataTypes.JSON }, { transaction }); });