diff --git a/htdocs/install/mysql/data/llx_c_availability.sql b/htdocs/install/mysql/data/llx_c_availability.sql new file mode 100644 index 0000000000000000000000000000000000000000..89081dbd13904fe6b676c2f6d783d9972e0c9dbb --- /dev/null +++ b/htdocs/install/mysql/data/llx_c_availability.sql @@ -0,0 +1,33 @@ +-- Copyright (C) 2011 Philippe GRAND <philippe.grand@atoo-net.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 2 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, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- + +-- +-- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors +-- de l'install et tous les sigles '--' sont supprimés. +-- + +-- +-- Availability type +-- + +delete from llx_c_availability; +insert into llx_c_availability (rowid,code,label,active) values (1, 'DSP', 'Disponible', 1); +insert into llx_c_availability (rowid,code,label,active) values (2, 'USM', 'Une semaine', 1); +insert into llx_c_availability (rowid,code,label,active) values (3, 'DSM', 'Deux semaines', 1); +insert into llx_c_availability (rowid,code,label,active) values (4, 'TSM', 'Trois semaines', 1); diff --git a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql index 629cce73e7ec36ddcd63fd6745501f09410778a3..b1c1ce598513fa721069afc8026b37a08aa3bf50 100755 --- a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql +++ b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql @@ -43,4 +43,14 @@ ALTER TABLE llx_societe ADD COLUMN fk_currency integer DEFAULT 0 AFTER fk_forme_ ALTER TABLE llx_societe_remise MODIFY remise_client double(6,3) DEFAULT 0 NOT NULL; -ALTER TABLE llx_propal ADD COLUMN delivery varchar(60) DEFAULT 0 NULL AFTER fk_adresse_livraison; +create table llx_c_availability +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + code varchar(30) NOT NULL, + label varchar(60) NOT NULL, + active tinyint DEFAULT 1 NOT NULL + +)ENGINE=innodb; +ALTER TABLE llx_propal ADD COLUMN fk_availability integer DEFAULT 0 AFTER fk_adresse_livraison; +ALTER TABLE llx_propal CHANGE COLUMN delivery fk_availability integer DEFAULT 0; +ALTER TABLE llx_availability CHANGE COLUMN libelle label integer varchar(60) NOT NULL; diff --git a/htdocs/install/mysql/tables/llx_c_delivery.sql b/htdocs/install/mysql/tables/llx_c_availability.sql similarity index 63% rename from htdocs/install/mysql/tables/llx_c_delivery.sql rename to htdocs/install/mysql/tables/llx_c_availability.sql index 50d2cc6dc6a322f058058256fa02b7ac76e6ba02..e2f225fe608bf11be2f100cd7f67e3bcd57a16c7 100644 --- a/htdocs/install/mysql/tables/llx_c_delivery.sql +++ b/htdocs/install/mysql/tables/llx_c_availability.sql @@ -15,25 +15,14 @@ -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- --- $Id: llx_c_delivery.sql,v 1.2 2011/02/24 09:57:04 hregis Exp $ +-- $Id$ -- ======================================================================== -create table llx_c_delivery +create table llx_c_availability ( - `rowid` int(11) NOT NULL auto_increment, - `code` varchar(30) default NULL, - `libelle` varchar(60) default NULL, - `active` tinyint(4) NOT NULL default '1', - PRIMARY KEY (`rowid`) -)ENGINE=innodb; - --- --- Contenu de la table `llx_c_delivery` --- - -INSERT INTO `llx_c_delivery` (`rowid`, `code`, `libelle`, `active`) VALUES -(1, 'DSP', 'Disponible', 1), -(2, 'USM', 'Une semaine', 1), -(3, 'DSM', 'Deux semaines', 1), -(4, 'TSM', 'Trois semaines', 1); + rowid integer AUTO_INCREMENT PRIMARY KEY, + code varchar(30) NOT NULL, + label varchar(60) NOT NULL, + active tinyint DEFAULT 1 NOT NULL +)ENGINE=innodb;