fix(warehouse): resolve migration timestamp collisions for Batch 5/6

- Rename 1790000000000/1 (collided with CreateWarehouseModule / WarehouseBatch2)
  to 1791000000000/1 so they sort after the existing warehouse migrations
- Make Batch 5 migration idempotent (createTable ifNotExists + ADD COLUMN IF NOT EXISTS)
  so it is safe whether or not it already ran

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hagernesh
2026-06-18 07:06:13 +00:00
parent 398bc9330e
commit f32d3d76e3
2 changed files with 5 additions and 5 deletions

View File

@@ -1,10 +1,10 @@
import { MigrationInterface, QueryRunner, Table, TableColumn } from 'typeorm';
import { MigrationInterface, QueryRunner, Table } from 'typeorm';
/**
* Batch 5 warehouse allocation rules, storage/demurrage fee rules,
* and demurrage lifecycle timestamps on inventory.
* and demurrage lifecycle timestamps on inventory. Idempotent.
*/
export class AddWarehouseAllocationAndFeeRules1790000000000 implements MigrationInterface {
export class AddWarehouseAllocationAndFeeRules1791000000000 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.createTable(
new Table({

View File

@@ -1,7 +1,7 @@
import { MigrationInterface, QueryRunner, Table } from 'typeorm';
/** Batch 6 — warehouse fee invoices + invoice items. */
export class AddWarehouseFeeInvoices1790000000001 implements MigrationInterface {
/** Batch 6 — warehouse fee invoices + invoice items. Idempotent (createTable ifNotExists). */
export class AddWarehouseFeeInvoices1791000000001 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.createTable(
new Table({