feat(f6.8): harden offline field flow and act documents
Android CI / RC / Android · lint, tests, debug APK, release compile (push) Successful in 3m41s
DH V2 CI / API · typecheck, tests, build (push) Successful in 31s
DH V2 CI / WEB · typecheck, build (push) Successful in 19s
Production dependency audit / API · production dependencies (push) Successful in 9s
Production dependency audit / WEB · production dependencies (push) Successful in 8s
DH V2 CI / Docker / scripts contract (push) Successful in 1m14s
Android CI / RC / Android · lint, tests, debug APK, release compile (push) Successful in 3m41s
DH V2 CI / API · typecheck, tests, build (push) Successful in 31s
DH V2 CI / WEB · typecheck, build (push) Successful in 19s
Production dependency audit / API · production dependencies (push) Successful in 9s
Production dependency audit / WEB · production dependencies (push) Successful in 8s
DH V2 CI / Docker / scripts contract (push) Successful in 1m14s
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class F68OfflineEvidenceIdempotency1790128200000 implements MigrationInterface {
|
||||
name = 'F68OfflineEvidenceIdempotency1790128200000';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE inspection_finding_evidence
|
||||
ADD COLUMN client_operation_id uuid
|
||||
`);
|
||||
await queryRunner.query(`
|
||||
CREATE UNIQUE INDEX uq_inspection_finding_evidence_client_operation
|
||||
ON inspection_finding_evidence (client_operation_id)
|
||||
WHERE client_operation_id IS NOT NULL
|
||||
`);
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE asset_field_capture_events
|
||||
ADD COLUMN client_operation_id uuid
|
||||
`);
|
||||
await queryRunner.query(`
|
||||
CREATE UNIQUE INDEX uq_asset_field_capture_events_client_operation
|
||||
ON asset_field_capture_events (client_operation_id)
|
||||
WHERE client_operation_id IS NOT NULL
|
||||
`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query('DROP INDEX uq_asset_field_capture_events_client_operation');
|
||||
await queryRunner.query('ALTER TABLE asset_field_capture_events DROP COLUMN client_operation_id');
|
||||
await queryRunner.query('DROP INDEX uq_inspection_finding_evidence_client_operation');
|
||||
await queryRunner.query('ALTER TABLE inspection_finding_evidence DROP COLUMN client_operation_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user