Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

chore: skip migration init from worker instance

Pranav Ca0f86cf9c3db
diff --git a/packages/nocodb/src/meta/meta.service.ts b/packages/nocodb/src/meta/meta.service.ts
index e0600dc2d7..783dabfd0d 100644
--- a/packages/nocodb/src/meta/meta.service.ts
+++ b/packages/nocodb/src/meta/meta.service.ts
@@ -21,6 +21,8 @@ dayjs.extend(timezone);
const nanoid = customAlphabet('1234567890abcdefghijklmnopqrstuvwxyz_', 4);
const nanoidv2 = customAlphabet('1234567890abcdefghijklmnopqrstuvwxyz', 14);
+const isWorker = process.env.NC_WORKER_CONTAINER === 'true';
+
@Injectable()
export class MetaService {
protected _knex: knex.Knex;
@@ -820,6 +822,11 @@ export class MetaService {
}
public async init(): Promise<boolean> {
+ // skip migration in worker container
+ if (isWorker) {
+ return true;
+ }
+
await this.connection.migrate.latest({
migrationSource: new XcMigrationSource(),
tableName: 'xc_knex_migrations',
diff --git a/packages/nocodb/src/models/GridViewColumn.ts b/packages/nocodb/src/models/GridViewColumn.ts
index e52cd608fd..577902e1ed 100644
--- a/packages/nocodb/src/models/GridViewColumn.ts
+++ b/packages/nocodb/src/models/GridViewColumn.ts
@@ -1,4 +1,8 @@
-import { VIEW_GRID_DEFAULT_WIDTH, type BoolType, type GridColumnType } from 'nocodb-sdk';
+import {
+ type BoolType,
+ type GridColumnType,
+ VIEW_GRID_DEFAULT_WIDTH,
+} from 'nocodb-sdk';
import type { NcContext } from '~/interface/config';
import type Upgrader from '~/Upgrader';
import View from '~/models/View';