Skip to content

Commit

Permalink
Evarisk#221 [SQL] add: clean SQL files
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Jul 6, 2023
1 parent 84364c0 commit 0660c2e
Show file tree
Hide file tree
Showing 21 changed files with 65 additions and 31 deletions.
15 changes: 15 additions & 0 deletions sql/data.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see https://www.gnu.org/licenses/.

INSERT INTO llx_c_actioncomm (id, code, type, libelle, module, active, todo, color, picto, position) VALUES (70, 'AC_TEL_IN', 'system', 'Incoming phone call', NULL, 1, NULL, NULL, NULL, 10);
INSERT INTO llx_c_actioncomm (id, code, type, libelle, module, active, todo, color, picto, position) VALUES (71, 'AC_TEL_OUT', 'system', 'Outgoing phone call', NULL, 1, NULL, NULL, NULL, 11);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (C) 2023 EVARISK <dev@evarisk.com>
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion sql/dolisirhdocuments/llx_dolisirh_dolisirhdocuments.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (C) 2023 EVARISK <dev@evarisk.com>
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (C) 2023 EVARISK <dev@evarisk.com>
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (C) 2023 EVARISK <dev@evarisk.com>
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
Expand Down
3 changes: 2 additions & 1 deletion sql/llx_categorie_invoice.key.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (C) 2023 EVARISK <dev@evarisk.com>
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
Expand All @@ -17,3 +17,4 @@ ALTER TABLE llx_categorie_invoice ADD PRIMARY KEY pk_categorie_invoice (fk_categ
ALTER TABLE llx_categorie_invoice ADD INDEX idx_categorie_invoice_fk_categorie (fk_categorie);
ALTER TABLE llx_categorie_invoice ADD INDEX idx_categorie_invoice_fk_invoice (fk_invoice);
ALTER TABLE llx_categorie_invoice ADD CONSTRAINT fk_categorie_invoice_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
ALTER TABLE llx_categorie_invoice ADD CONSTRAINT fk_categorie_invoice_facture_rowid FOREIGN KEY (fk_invoice) REFERENCES llx_facture (rowid);
4 changes: 2 additions & 2 deletions sql/llx_categorie_invoice.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (C) 2023 EVARISK <dev@evarisk.com>
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
Expand All @@ -14,7 +14,7 @@
-- along with this program. If not, see https://www.gnu.org/licenses/.

CREATE TABLE llx_categorie_invoice(
fk_categorie integer NOT NULL,
fk_categorie integer NOT NULL,
fk_invoice integer NOT NULL,
import_key varchar(14)
) ENGINE=innodb;
3 changes: 2 additions & 1 deletion sql/llx_categorie_invoicerec.key.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (C) 2023 EVARISK <dev@evarisk.com>
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
Expand All @@ -17,3 +17,4 @@ ALTER TABLE llx_categorie_invoicerec ADD PRIMARY KEY pk_categorie_invoicerec (fk
ALTER TABLE llx_categorie_invoicerec ADD INDEX idx_categorie_invoicerec_fk_categorie (fk_categorie);
ALTER TABLE llx_categorie_invoicerec ADD INDEX idx_categorie_invoicerec_fk_invoicerec (fk_invoicerec);
ALTER TABLE llx_categorie_invoicerec ADD CONSTRAINT fk_categorie_invoicerec_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
ALTER TABLE llx_categorie_invoicerec ADD CONSTRAINT fk_categorie_invoicerec_facture_rec_rowid FOREIGN KEY (fk_invoicerec) REFERENCES llx_facture_rec (rowid);
4 changes: 2 additions & 2 deletions sql/llx_categorie_invoicerec.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (C) 2023 EVARISK <dev@evarisk.com>
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
Expand All @@ -14,7 +14,7 @@
-- along with this program. If not, see https://www.gnu.org/licenses/.

CREATE TABLE llx_categorie_invoicerec(
fk_categorie integer NOT NULL,
fk_categorie integer NOT NULL,
fk_invoicerec integer NOT NULL,
import_key varchar(14)
) ENGINE=innodb;
2 changes: 1 addition & 1 deletion sql/llx_element_workinghours.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (C) 2023 EVARISK <dev@evarisk.com>
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
Expand Down
3 changes: 2 additions & 1 deletion sql/timesheet/llx_categorie_timesheet.key.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (C) 2023 EVARISK <dev@evarisk.com>
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
Expand All @@ -17,3 +17,4 @@ ALTER TABLE llx_categorie_timesheet ADD PRIMARY KEY pk_categorie_timesheet (fk_c
ALTER TABLE llx_categorie_timesheet ADD INDEX idx_categorie_timesheet_fk_categorie (fk_categorie);
ALTER TABLE llx_categorie_timesheet ADD INDEX idx_categorie_timesheet_fk_timesheet (fk_timesheet);
ALTER TABLE llx_categorie_timesheet ADD CONSTRAINT fk_categorie_timesheet_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
ALTER TABLE llx_categorie_timesheet ADD CONSTRAINT fk_categorie_timesheet_dolisirh_timesheet_rowid FOREIGN KEY (fk_timesheet) REFERENCES llx_dolisirh_timesheet (rowid);
4 changes: 2 additions & 2 deletions sql/timesheet/llx_categorie_timesheet.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (C) 2023 EVARISK <dev@evarisk.com>
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
Expand All @@ -14,7 +14,7 @@
-- along with this program. If not, see https://www.gnu.org/licenses/.

CREATE TABLE llx_categorie_timesheet(
fk_categorie integer NOT NULL,
fk_categorie integer NOT NULL,
fk_timesheet integer NOT NULL,
import_key varchar(14)
) ENGINE=innodb;
2 changes: 1 addition & 1 deletion sql/timesheet/llx_dolisirh_timesheet.key.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (C) 2023 EVARISK <dev@evarisk.com>
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion sql/timesheet/llx_dolisirh_timesheet.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (C) 2023 EVARISK <dev@evarisk.com>
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion sql/timesheet/llx_dolisirh_timesheet_extrafields.key.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (C) 2023 EVARISK <dev@evarisk.com>
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
Expand Down
10 changes: 5 additions & 5 deletions sql/timesheet/llx_dolisirh_timesheet_extrafields.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (C) 2023 EVARISK <dev@evarisk.com>
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
Expand All @@ -14,9 +14,9 @@
-- along with this program. If not, see https://www.gnu.org/licenses/.

create table llx_dolisirh_timesheet_extrafields(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
fk_object integer NOT NULL,
import_key varchar(14) -- import key
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
fk_object integer NOT NULL,
import_key varchar(14) -- import key
) ENGINE=innodb;

2 changes: 1 addition & 1 deletion sql/timesheet/llx_dolisirh_timesheetdet.key.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (C) 2023 EVARISK <dev@evarisk.com>
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion sql/timesheet/llx_dolisirh_timesheetdet.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (C) 2023 EVARISK <dev@evarisk.com>
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
Expand Down
5 changes: 3 additions & 2 deletions sql/timesheet/llx_dolisirh_timesheetdet_extrafields.key.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (C) 2023 EVARISK <dev@evarisk.com>
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
Expand All @@ -13,4 +13,5 @@
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see https://www.gnu.org/licenses/.

ALTER TABLE llx_dolisirh_timesheetdet_extrafields ADD INDEX idx_timesheetdet_fk_object(fk_object);
ALTER TABLE llx_dolisirh_timesheetdet_extrafields ADD INDEX idx_timesheetdet_rowid (rowid);
ALTER TABLE llx_dolisirh_timesheetdet_extrafields ADD INDEX idx_timesheetdet_fk_object (fk_object);
10 changes: 5 additions & 5 deletions sql/timesheet/llx_dolisirh_timesheetdet_extrafields.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Copyright (C) 2023 EVARISK <dev@evarisk.com>
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
Expand All @@ -14,9 +14,9 @@
-- along with this program. If not, see https://www.gnu.org/licenses/.

create table llx_dolisirh_timesheetdet_extrafields(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
fk_object integer NOT NULL,
import_key varchar(14) -- import key
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
fk_object integer NOT NULL,
import_key varchar(14) -- import key
) ENGINE=innodb;

15 changes: 15 additions & 0 deletions sql/update.sql
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
-- Copyright (C) 2021-2023 EVARISK <technique@evarisk.com>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see https://www.gnu.org/licenses/.


0 comments on commit 0660c2e

Please sign in to comment.