Skip to content

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

add heartbeat process (heartbeat not yet registered)

Fendy Heryantoe989262fcb15
diff --git a/packages/nocodb/src/meta/migrations/XcMigrationSourcev2.ts b/packages/nocodb/src/meta/migrations/XcMigrationSourcev2.ts
index 2b622ae35d..5ece74d4ba 100644
--- a/packages/nocodb/src/meta/migrations/XcMigrationSourcev2.ts
+++ b/packages/nocodb/src/meta/migrations/XcMigrationSourcev2.ts
@@ -86,6 +86,7 @@ import * as nc_094_add_meta_to_filter_exp_v2 from '~/meta/migrations/v2/nc_094_a
import * as nc_096_deprecate_unused from '~/meta/migrations/v2/nc_096_deprecate_unused';
import * as nc_097_unify_schema from '~/meta/migrations/v2/nc_097_unify_schema';
import * as nc_098_default_workspace from '~/meta/migrations/v2/nc_098_default_workspace';
+import * as nc_099_automation_is_polling from '~/meta/migrations/v2/nc_099_automation_is_polling';
// Create a custom migration source class
export default class XcMigrationSourcev2 {
@@ -362,6 +363,8 @@ export default class XcMigrationSourcev2 {
return nc_097_unify_schema;
case 'nc_098_default_workspace':
return nc_098_default_workspace;
+ case 'nc_099_automation_is_polling':
+ return nc_099_automation_is_polling;
}
}
}
diff --git a/packages/nocodb/src/meta/migrations/v2/nc_099_automation_is_polling.ts b/packages/nocodb/src/meta/migrations/v2/nc_099_automation_is_polling.ts
new file mode 100644
index 0000000000..62906537b6
--- /dev/null
+++ b/packages/nocodb/src/meta/migrations/v2/nc_099_automation_is_polling.ts
@@ -0,0 +1,22 @@
+import { MetaTable } from 'src/cli';
+import type { Knex } from 'knex';
+
+const up = async (knex: Knex) => {
+ await knex.schema.alterTable(MetaTable.AUTOMATIONS, (table) => {
+ table.boolean('wf_is_polling').defaultTo(false);
+ table.boolean('wf_is_polling_heartbeat').defaultTo(false);
+ table.integer('wf_polling_interval');
+ table.bigint('wf_next_polling_at');
+ });
+};
+
+const down = async (knex: Knex) => {
+ await knex.schema.alterTable(MetaTable.AUTOMATIONS, (table) => {
+ table.dropColumn('wf_is_polling');
+ table.dropColumn('wf_is_polling_heartbeat');
+ table.dropColumn('wf_polling_interval');
+ table.dropColumn('wf_next_polling_at');
+ });
+};
+
+export { up, down };