Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz Source: /opt/alga-psa on psa.joliet.tech
51 lines
1.8 KiB
JavaScript
51 lines
1.8 KiB
JavaScript
/**
|
|
* Migration to create the workflow_event_processing table
|
|
* This table tracks the processing status of workflow events in the distributed architecture
|
|
*/
|
|
exports.up = function(knex) {
|
|
return knex.schema.createTable('workflow_event_processing', (table) => {
|
|
// Primary key
|
|
table.uuid('processing_id').primary();
|
|
|
|
// References to workflow events
|
|
table.uuid('event_id').notNullable().references('event_id').inTable('workflow_events').onDelete('CASCADE');
|
|
table.uuid('execution_id').notNullable().references('execution_id').inTable('workflow_executions').onDelete('CASCADE');
|
|
|
|
// Multi-tenancy support
|
|
table.string('tenant').notNullable();
|
|
|
|
// Processing status
|
|
table.enum('status', [
|
|
'pending', // Event has been persisted but not yet published to Redis
|
|
'published', // Event has been published to Redis
|
|
'processing', // Event is being processed by a worker
|
|
'completed', // Event has been successfully processed
|
|
'failed', // Event processing failed
|
|
'retrying' // Event is being retried after a failure
|
|
]).notNullable().defaultTo('pending');
|
|
|
|
// Worker information
|
|
table.string('worker_id').nullable();
|
|
|
|
// Retry information
|
|
table.integer('attempt_count').notNullable().defaultTo(0);
|
|
table.timestamp('last_attempt').nullable();
|
|
table.text('error_message').nullable();
|
|
|
|
// Timestamps
|
|
table.timestamp('created_at').notNullable();
|
|
table.timestamp('updated_at').notNullable();
|
|
|
|
// Indexes
|
|
table.index('event_id');
|
|
table.index('execution_id');
|
|
table.index('tenant');
|
|
table.index('status');
|
|
table.index(['tenant', 'status']);
|
|
table.index(['execution_id', 'status']);
|
|
});
|
|
};
|
|
|
|
exports.down = function(knex) {
|
|
return knex.schema.dropTableIfExists('workflow_event_processing');
|
|
}; |