[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 31/33: Database upgrade
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 31/33: Database upgrade |
Date: |
Thu, 18 Jul 2024 12:24:49 -0400 (EDT) |
sparkyx pushed a commit to branch unstable
in repository noalyss.
commit 5f13e6ede58c0f6396e45d79905a6442ef8a5810
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sat Jul 13 22:00:39 2024 +0200
Database upgrade
---
include/constant.php | 2 +-
.../sql/patch/upgrade197.sql | 7 +-
sql/upgrade.sql | 84 ----------------------
3 files changed, 7 insertions(+), 86 deletions(-)
diff --git a/include/constant.php b/include/constant.php
index 020df53e8..81b85cf0f 100644
--- a/include/constant.php
+++ b/include/constant.php
@@ -28,7 +28,7 @@ global $version_noalyss;
define('NOALYSS_VERSION', 9206 );
// Database schema version
-define("DBVERSION", 197);
+define("DBVERSION", 198);
// version for MONO_DATABASE
define("MONO_DATABASE", 25);
diff --git a/sql/upgrade.sql b/include/sql/patch/upgrade197.sql
similarity index 95%
copy from sql/upgrade.sql
copy to include/sql/patch/upgrade197.sql
index 44c48d457..8863e4d60 100644
--- a/sql/upgrade.sql
+++ b/include/sql/patch/upgrade197.sql
@@ -1,9 +1,10 @@
+begin;
update menu_ref set me_menu='Navigateur 🧭' where me_code ~ 'NAVI';
update menu_ref set me_menu='Configuration 🔧' where me_code='CFG';
-update menu_ref set me_menu='Recherech 🔎' where me_code='SEARCH';
+update menu_ref set me_menu='Recherche 🔎' where me_code='SEARCH';
update menu_ref set me_menu='Agenda 📅' where me_code='AGENDA';
@@ -82,3 +83,7 @@ AS SELECT a.f_id,
WHERE fiche_detail.ad_id = 5) l ON a.f_id = l.f_id;
COMMENT ON VIEW public.vw_fiche_attr IS 'Some attribute for all cards';
+
+
+insert into version (val,v_description) values (198,'Cosmetic and VAT');
+commit;
\ No newline at end of file
diff --git a/sql/upgrade.sql b/sql/upgrade.sql
index 44c48d457..e69de29bb 100644
--- a/sql/upgrade.sql
+++ b/sql/upgrade.sql
@@ -1,84 +0,0 @@
-
-update menu_ref set me_menu='Navigateur 🧭' where me_code ~ 'NAVI';
-
-update menu_ref set me_menu='Configuration 🔧' where me_code='CFG';
-
-update menu_ref set me_menu='Recherech 🔎' where me_code='SEARCH';
-
-update menu_ref set me_menu='Agenda 📅' where me_code='AGENDA';
-
-
-ALTER TABLE public.tva_rate ADD CONSTRAINT tva_code_number_check CHECK
(tva_code::text !~ '^([0-9]+)$');
-
--- drop view if exists public.vw_fiche_attr;
-
-CREATE OR REPLACE VIEW public.vw_fiche_attr
-AS SELECT a.f_id,
- a.fd_id,
- a.ad_value AS vw_name,
- k.ad_value AS vw_first_name,
- b.ad_value AS vw_sell,
- c.ad_value AS vw_buy,
- d.ad_value AS tva_code,
- tva_rate.tva_id,
- tva_rate.tva_rate,
- tva_rate.tva_label,
- e.ad_value AS vw_addr,
- f.ad_value AS vw_cp,
- j.ad_value AS quick_code,
- h.ad_value AS vw_description,
- i.ad_value AS tva_num,
- fiche_def.frd_id,
- l.ad_value AS accounting,
- a.f_enable
- FROM ( SELECT fiche.f_id,
- fiche.fd_id,
- fiche.f_enable,
- fiche_detail.ad_value
- FROM fiche
- LEFT JOIN fiche_detail USING (f_id)
- WHERE fiche_detail.ad_id = 1) a
- LEFT JOIN ( SELECT fiche_detail.f_id,
- fiche_detail.ad_value
- FROM fiche_detail
- WHERE fiche_detail.ad_id = 6) b ON a.f_id = b.f_id
- LEFT JOIN ( SELECT fiche_detail.f_id,
- fiche_detail.ad_value
- FROM fiche_detail
- WHERE fiche_detail.ad_id = 7) c ON a.f_id = c.f_id
- LEFT JOIN ( SELECT fiche_detail.f_id,
- fiche_detail.ad_value
- FROM fiche_detail
- WHERE fiche_detail.ad_id = 2) d ON a.f_id = d.f_id
- LEFT JOIN ( SELECT fiche_detail.f_id,
- fiche_detail.ad_value
- FROM fiche_detail
- WHERE fiche_detail.ad_id = 14) e ON a.f_id = e.f_id
- LEFT JOIN ( SELECT fiche_detail.f_id,
- fiche_detail.ad_value
- FROM fiche_detail
- WHERE fiche_detail.ad_id = 15) f ON a.f_id = f.f_id
- LEFT JOIN ( SELECT fiche_detail.f_id,
- fiche_detail.ad_value
- FROM fiche_detail
- WHERE fiche_detail.ad_id = 23) j ON a.f_id = j.f_id
- LEFT JOIN ( SELECT fiche_detail.f_id,
- fiche_detail.ad_value
- FROM fiche_detail
- WHERE fiche_detail.ad_id = 9) h ON a.f_id = h.f_id
- LEFT JOIN ( SELECT fiche_detail.f_id,
- fiche_detail.ad_value
- FROM fiche_detail
- WHERE fiche_detail.ad_id = 13) i ON a.f_id = i.f_id
- LEFT JOIN ( SELECT fiche_detail.f_id,
- fiche_detail.ad_value
- FROM fiche_detail
- WHERE fiche_detail.ad_id = 32) k ON a.f_id = k.f_id
- LEFT JOIN tva_rate ON d.ad_value = tva_rate.tva_id::text
- JOIN fiche_def USING (fd_id)
- LEFT JOIN ( SELECT fiche_detail.f_id,
- fiche_detail.ad_value
- FROM fiche_detail
- WHERE fiche_detail.ad_id = 5) l ON a.f_id = l.f_id;
-
-COMMENT ON VIEW public.vw_fiche_attr IS 'Some attribute for all cards';
- [Noalyss-commit] [noalyss] branch unstable updated (2fa3bc882 -> 26a3f802d), dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 02/33: Documentation code, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 10/33: PRINTTVA : display tva_code, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 08/33: Merge branch '2362-ccardat' into stable, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 04/33: Documentation code, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 09/33: Merge branch 'unstable' into pre-stable, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 06/33: PDF : operation detail for a card : add first name, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 22/33: REPORT Put the amount in red if negative, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 31/33: Database upgrade,
dwm <=
- [Noalyss-commit] [noalyss] 18/33: Fix Bug : tva_code not retrieve from search, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 17/33: PHPUNIT Acc_TVA : tva_code must contains at least one letter Acc_Ledger : input_new PDF_Anc_Acc_ListTest:testPdf_Card Fix bug sizIe, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 28/33: VEN - ACH fix default currency, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 32/33: test unit : pdf activity, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 33/33: Merge branch 'pre-stable' into unstable, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 29/33: ODS : cosmetic detail operation, not aligned, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 07/33: remove euro symbole, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 16/33: cosmetic : improve appearance, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 19/33: ACH-13 : extourne also analytic, dwm, 2024/07/18
- [Noalyss-commit] [noalyss] 23/33: Bug : ven-3 duplicate does not work with currency : incorrect amount, dwm, 2024/07/18