From c5faddde1f20447dc2726b7466edf1551159d7d2 Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Fri, 27 Mar 2026 08:10:21 +0100 Subject: [PATCH] feat: Add synchronization of articles, article supplementary information, GTINs, and permanent availability statistics from MSSQL to PostgreSQL. --- postgres/init.sql | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/postgres/init.sql b/postgres/init.sql index 1432761..23fe3b3 100644 --- a/postgres/init.sql +++ b/postgres/init.sql @@ -29,7 +29,8 @@ CREATE TABLE IF NOT EXISTS articles ( suspendu TEXT, suividatecreation TIMESTAMP, suividatemodif TIMESTAMP, - nom_no_id BIGINT + nom_no_id BIGINT, + artcentrale TEXT ); CREATE INDEX IF NOT EXISTS idx_articles_codein ON articles (codein); CREATE INDEX IF NOT EXISTS idx_articles_libelle1 ON articles (libelle1); @@ -323,3 +324,20 @@ CREATE TABLE IF NOT EXISTS statopca ( PRIMARY KEY (site, datmvt) ); CREATE INDEX IF NOT EXISTS idx_statopca_datmvt ON statopca (datmvt); + +-- ============================================================ +-- Gamme conseillée par site (STAT_DISPOPERM SQL Server) +-- ============================================================ + +CREATE TABLE IF NOT EXISTS stat_dispoperm ( + codesite TEXT NOT NULL, + code_art TEXT NOT NULL, + recommand TEXT, + statut TEXT, + qtemoyer NUMERIC(10,3), + qtemoyes NUMERIC(10,3), + camoyes NUMERIC(12,4), + nbreclient INTEGER, + PRIMARY KEY (codesite, code_art) +); +CREATE INDEX IF NOT EXISTS idx_stat_dispoperm_code_art ON stat_dispoperm (code_art);