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
2.4 KiB
2.4 KiB
Citus Migrations
These migrations are specifically for Citus (distributed PostgreSQL) environments.
When to Run These Migrations
- Production: YES - Run together with base migrations in chronological order
- Automated Testing (Argo): YES - Run together with base migrations in chronological order
- Local Development: NO - Skip these unless testing Citus specifically
- Open Source: NO - These are EE-only features
Important: Migration Execution
These migrations use timestamp-based naming (same as main migrations) to ensure proper ordering. When running in production or test environments:
# Copy all migrations to a single directory and run in chronological order
cp server/migrations/*.cjs temp_migrations/
cp ee/server/migrations/citus/*.cjs temp_migrations/
# Run migrations from temp_migrations/ in timestamp order
Migration Files
20250805000000_enable_citus_extension.cjs- Enable Citus extension20250805000001_create_reference_tables.cjs- Create reference tables (replicated to all nodes)20250805000002_distribute_tenant_and_user_tables.cjs- Distribute foundational tenant/user tables20250805000003_distribute_company_tables.cjs- Distribute company-related tables20250805000004_distribute_billing_and_service_tables.cjs- Distribute billing and service catalog20250805000005_distribute_ticket_and_activity_tables.cjs- Distribute tickets, projects, time tracking20250805000006_distribute_remaining_tables.cjs- Distribute remaining tables (invoices, assets, workflows, etc.)
Features
- Idempotent: Each migration checks if tables are already distributed before attempting distribution
- Safe for partial deployments: Works with environments that are partially distributed
- Proper dependency ordering: Tables are distributed in order of their foreign key dependencies
Colocation Groups
- Group 41: Main distributed tables (tenant-partitioned) - default colocation
- Group 48: Reference tables (replicated across all workers)
Distribution Keys
- Most tables use
tenantas the distribution column - Some email-related tables use
tenant_idas the distribution column - All distributed tables are colocated with the
tenantstable for efficient JOINs
Rollback
Each migration includes a down function to undistribute tables if needed.
Note: Undistributing tables with large amounts of data can be slow and resource-intensive.