add heartbeat process (heartbeat not yet registered)

This commit is contained in:
Fendy Heryanto
2026-01-20 11:19:40 +00:00
parent d38c6534c7
commit e989262fcb
2 changed files with 25 additions and 0 deletions

View File

@@ -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;
}
}
}

View File

@@ -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 };