feat(dm): added article description into the historical data
This commit is contained in:
8
LogisticsSupportTool_API_DOCS/LstV2/datamart/folder.bru
Normal file
8
LogisticsSupportTool_API_DOCS/LstV2/datamart/folder.bru
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
meta {
|
||||||
|
name: datamart
|
||||||
|
seq: 8
|
||||||
|
}
|
||||||
|
|
||||||
|
auth {
|
||||||
|
mode: inherit
|
||||||
|
}
|
||||||
@@ -12,7 +12,6 @@ import { db } from "../../../../pkg/db/db.js";
|
|||||||
import {
|
import {
|
||||||
type ForecastData,
|
type ForecastData,
|
||||||
forecastData,
|
forecastData,
|
||||||
forecastDataSchema,
|
|
||||||
} from "../../../../pkg/db/schema/forecastEDIData.js";
|
} from "../../../../pkg/db/schema/forecastEDIData.js";
|
||||||
import { prodQuery } from "../../../../pkg/prodSql/prodQuery.js";
|
import { prodQuery } from "../../../../pkg/prodSql/prodQuery.js";
|
||||||
import { activeArticle } from "../../../../pkg/prodSql/querys/datamart/article.js";
|
import { activeArticle } from "../../../../pkg/prodSql/querys/datamart/article.js";
|
||||||
@@ -44,6 +43,7 @@ export const forecastEdiData = async (data: ForecastData[]) => {
|
|||||||
forecaseEDIDATA.push({
|
forecaseEDIDATA.push({
|
||||||
...newData,
|
...newData,
|
||||||
article: activeAV[0].IdArtikelvarianten,
|
article: activeAV[0].IdArtikelvarianten,
|
||||||
|
description: activeAV[0].Bezeichnung, // change this later once we migrate more items
|
||||||
requirementDate: new Date(newData.requirementDate),
|
requirementDate: new Date(newData.requirementDate),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ export const forecastData = pgTable("forecast_Data", {
|
|||||||
quantity: real("quantity"),
|
quantity: real("quantity"),
|
||||||
requirementDate: timestamp("requirement_date").notNull(),
|
requirementDate: timestamp("requirement_date").notNull(),
|
||||||
article: integer("article"),
|
article: integer("article"),
|
||||||
|
description: text("description"),
|
||||||
createdAt: timestamp("created_at").defaultNow(),
|
createdAt: timestamp("created_at").defaultNow(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
2
migrations/0045_redundant_taskmaster.sql
Normal file
2
migrations/0045_redundant_taskmaster.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE "forecast_Data" ADD COLUMN "description" text;--> statement-breakpoint
|
||||||
|
ALTER TABLE "lease_invoices" ADD COLUMN "comment" text;
|
||||||
2227
migrations/meta/0045_snapshot.json
Normal file
2227
migrations/meta/0045_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -316,6 +316,13 @@
|
|||||||
"when": 1762314701057,
|
"when": 1762314701057,
|
||||||
"tag": "0044_melted_mole_man",
|
"tag": "0044_melted_mole_man",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 45,
|
||||||
|
"version": "7",
|
||||||
|
"when": 1764104121933,
|
||||||
|
"tag": "0045_redundant_taskmaster",
|
||||||
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user