mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 17:45:42 +00:00
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:
@@ -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,
|
* 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> {
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.createTable(
|
await queryRunner.createTable(
|
||||||
new Table({
|
new Table({
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import { MigrationInterface, QueryRunner, Table } from 'typeorm';
|
import { MigrationInterface, QueryRunner, Table } from 'typeorm';
|
||||||
|
|
||||||
/** Batch 6 — warehouse fee invoices + invoice items. */
|
/** Batch 6 — warehouse fee invoices + invoice items. Idempotent (createTable ifNotExists). */
|
||||||
export class AddWarehouseFeeInvoices1790000000001 implements MigrationInterface {
|
export class AddWarehouseFeeInvoices1791000000001 implements MigrationInterface {
|
||||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.createTable(
|
await queryRunner.createTable(
|
||||||
new Table({
|
new Table({
|
||||||
Reference in New Issue
Block a user