[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 01/162: create currency SQL tables
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 01/162: create currency SQL tables |
Date: |
Sat, 11 Jul 2020 13:23:16 -0400 (EDT) |
sparkyx pushed a commit to annotated tag E-4
in repository noalyss.
commit 71962e728bcae12d1c53a2474e73217bc9e7a7f6
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Thu Apr 19 10:23:19 2018 +0200
create currency SQL tables
---
sql/upgrade.sql | 35 ++++++++++++++++++++++++++---------
1 file changed, 26 insertions(+), 9 deletions(-)
diff --git a/sql/upgrade.sql b/sql/upgrade.sql
index f3ed35a..0aeb267 100644
--- a/sql/upgrade.sql
+++ b/sql/upgrade.sql
@@ -1,9 +1,26 @@
-create view v_tva_rate as select
- tva_id,
- tva_rate,
- tva_label,
- tva_comment,
- split_part(tva_poste,',',1) as tva_purchase,
- split_part(tva_poste,',',2) as tva_sale,
- tva_both_side
-from tva_rate;
+-- Drop table
+
+-- DROP TABLE public.currency
+
+CREATE TABLE public.currency (
+ id serial NOT NULL,
+ cr_code_iso varchar(10) NULL,
+ CONSTRAINT currency_pk PRIMARY KEY (id),
+ CONSTRAINT currency_un UNIQUE (cr_code_iso)
+);
+
+-- Drop table
+
+-- DROP TABLE public.currency_history
+
+CREATE TABLE public.currency_history (
+ id serial NOT NULL,
+ ch_value numeric(6) NOT NULL,
+ ch_from timestamp NOT NULL,
+ currency_id int4 NOT NULL,
+ CONSTRAINT currency_history_pk PRIMARY KEY (id),
+ CONSTRAINT currency_history_currency_fk FOREIGN KEY (id) REFERENCES
currency(id)
+)
+;
+
+-- Ajouter commentaire sur colonne
- [Noalyss-commit] [noalyss] annotated tag E-4 created (now c7c64a9), Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 02/162: Currency : add PHP Class for SQL table, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 04/162: Currency : add test file + database file + mtable, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 03/162: Currency : create view + add currency name to table currency, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 01/162: create currency SQL tables,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 05/162: html_page_start : protect query, improve code, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 10/162: Currency : add SQL constraint + doc, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 08/162: Currency = add a mode currency, possible to work without, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 06/162: Currency : add ajax call to delete one rate , add documentation , remove debug info, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 12/162: Action_Code : add validate, cancel and modify icon, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 15/162: insert_jrnx : add debug, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 07/162: Currency : add menu for currency, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 13/162: indent, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 14/162: INum : add function onchange with inplace edit, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 16/162: Currency : insert operation with currency in VEN and ACH, Dany De Bontridder, 2020/07/11