π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
fix: revert default version value to 1 in nc_016_links_v2 migration
Pranav Ca080228b4046
diff --git a/packages/nocodb/src/db/genRollupSelectv2.ts b/packages/nocodb/src/db/genRollupSelectv2.tsindex 797fdee601..46b50fa35e 100644--- a/packages/nocodb/src/db/genRollupSelectv2.ts+++ b/packages/nocodb/src/db/genRollupSelectv2.ts@@ -273,6 +273,13 @@ export default async function genRollupSelectv2(param: {case RelationTypes.MANY_TO_MANY: {profiler.log('Relation: ' + relationColumnOption.type);const mmModel = await relationColumnOption.getMMModel(mmContext);++ if (!mmModel) {+ return this.dbDriver.raw(`?`, [+ NcDataErrorCodes.NC_ERR_MM_MODEL_NOT_FOUND,+ ]);+ }+const mmChildCol = await relationColumnOption.getMMChildColumn(mmContext);const mmParentCol = await relationColumnOption.getMMParentColumn(mmContext,@@ -281,11 +288,6 @@ export default async function genRollupSelectv2(param: {id: mmModel.id,dbDriver: knex,});- if (!mmModel) {- return this.dbDriver.raw(`?`, [- NcDataErrorCodes.NC_ERR_MM_MODEL_NOT_FOUND,- ]);- }const qb = knex(knex.raw(`?? as ??`, [diff --git a/packages/nocodb/src/meta/migrations/v0/nc_202602250000_links_v2.ts b/packages/nocodb/src/meta/migrations/v0/nc_202602250000_links_v2.tsindex 74d309a4e8..bc841b2186 100644--- a/packages/nocodb/src/meta/migrations/v0/nc_202602250000_links_v2.ts+++ b/packages/nocodb/src/meta/migrations/v0/nc_202602250000_links_v2.ts@@ -3,7 +3,7 @@ import { MetaTable } from '~/utils/globals';const up = async (knex: Knex) => {await knex.schema.alterTable(MetaTable.COL_RELATIONS, (table) => {- table.integer('version', 10).defaultTo(2);+ table.integer('version', 10).defaultTo(1);});};