commit add table

This commit is contained in:
Florian HENRY 2020-10-14 12:24:35 +02:00
parent 7838ca32ba
commit 77de8c242c
4 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,29 @@
-- Copyright (C) 2020 florian HENRY florian.henry@scopen.fr
--
-- 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/>.
--
--
--
-- Do not place a comment at the end of the line, this file is parsed when
-- from the install and all '--' are removed.
--
-- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors
-- de l'install et tous les sigles '--' sont supprimés.
--
INSERT INTO llx_c_product_nature (code, label, active) VALUES (-1, '', 1);
INSERT INTO llx_c_product_nature (code, label, active) VALUES (0, 'RowMaterial', 1);
INSERT INTO llx_c_product_nature (code, label, active) VALUES (1, 'Finished', 1);

View File

@ -406,3 +406,15 @@ ALTER TABLE llx_projet_task_time MODIFY COLUMN datec datetime;
DELETE FROM llx_user_rights WHERE fk_id IN (SELECT id FROM llx_rights_def where module = 'holiday' and perms = 'lire_tous');
DELETE FROM llx_rights_def where module = 'holiday' and perms = 'lire_tous';
CREATE TABLE llx_c_product_nature (
rowid integer AUTO_INCREMENT PRIMARY KEY,
code integer NOT NULL,
label varchar(100),
active tinyint DEFAULT 1 NOT NULL
) ENGINE=innodb;
ALTER TABLE llx_c_product_nature ADD UNIQUE INDEX uk_c_product_nature(code);
INSERT INTO llx_c_product_nature (code, label, active) VALUES (-1, '', 1);
INSERT INTO llx_c_product_nature (code, label, active) VALUES (0, 'RowMaterial', 1);
INSERT INTO llx_c_product_nature (code, label, active) VALUES (1, 'Finished', 1);

View File

@ -0,0 +1 @@
ALTER TABLE llx_c_product_nature ADD UNIQUE INDEX uk_c_product_nature(code);

View File

@ -0,0 +1,24 @@
-- ========================================================================
-- Copyright (C) 2020 Florian HENRY <florian.henry@scopen.fr>
--
-- 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/>.
--
-- ========================================================================
CREATE TABLE llx_c_product_nature (
rowid integer AUTO_INCREMENT PRIMARY KEY,
code varchar(3) NOT NULL,
label varchar(100),
active tinyint DEFAULT 1 NOT NULL
) ENGINE=innodb;