mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 06:28:12 +00:00
Store the signer's saved-signature URL on booking_handovers (new signature_image_url column) when a handover is signed — per-truck or booking-level — so signed handover documents can render the actual signature, matching the contract-signing flow. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
23 lines
810 B
TypeScript
23 lines
810 B
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
|
|
/**
|
|
* Persist the signer's saved-signature image on the handover record, so the
|
|
* signed handover document can render the actual signature (not just the
|
|
* typed name) — parity with the booking-contract signing flow.
|
|
*/
|
|
export class AddSignatureToHandover2800000000001 implements MigrationInterface {
|
|
name = 'AddSignatureToHandover2800000000001';
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(
|
|
`ALTER TABLE freight.booking_handovers ADD COLUMN IF NOT EXISTS signature_image_url text;`,
|
|
);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(
|
|
`ALTER TABLE freight.booking_handovers DROP COLUMN IF EXISTS signature_image_url;`,
|
|
);
|
|
}
|
|
}
|