Fix: Corrige quelques instructions SQL non normes qui posent pb dans la conversion vers pgsql.

This commit is contained in:
Laurent Destailleur 2007-08-26 19:21:40 +00:00
parent 6a569236df
commit cc304cdce4
8 changed files with 45 additions and 38 deletions

View File

@ -170,7 +170,7 @@ foreach my $file (keys %filelist) {
} }
# enum -> check # enum -> check
if (/([\w\"]*)\s+enum\s*\(((?:['"]\w+['"]\s*,)+['"]\w+['"])\)(.*)$/i) { if (/([\w\"]*)\s+enum\s*\(((?:['"][\?\w]+['"]\s*,)+['"][\?\w]+['"])\)(.*)$/i) {
$enum_column=$1; $enum_column=$1;
$enum_datafield{$enum_column}=$2; # 'abc','def', ... $enum_datafield{$enum_column}=$2; # 'abc','def', ...
my $suite=$3; my $suite=$3;

View File

@ -927,7 +927,7 @@ create table llx_bordereau_cheque
rowid integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,
datec datetime, datec datetime,
date_bordereau date, date_bordereau date,
number mediumint ZEROFILL, number mediumint,
amount float(12,2), amount float(12,2),
nbcheque smallint UNSIGNED DEFAULT 0, nbcheque smallint UNSIGNED DEFAULT 0,
fk_bank_account integer, fk_bank_account integer,

View File

@ -820,3 +820,6 @@ update llx_boxes set box_order = concat('A0',box_order) where length(box_order)
update llx_boxes set box_order = concat('B0',box_order) where length(box_order) = 1 and substring(box_order,-1) in ('0','2','4','6','8'); update llx_boxes set box_order = concat('B0',box_order) where length(box_order) = 1 and substring(box_order,-1) in ('0','2','4','6','8');
update llx_boxes set box_order = concat('A',box_order) where length(box_order) = 2 and substring(box_order,-1) in ('1','3','5','7','9'); update llx_boxes set box_order = concat('A',box_order) where length(box_order) = 2 and substring(box_order,-1) in ('1','3','5','7','9');
update llx_boxes set box_order = concat('B',box_order) where length(box_order) = 2 and substring(box_order,-1) in ('0','2','4','6','8'); update llx_boxes set box_order = concat('B',box_order) where length(box_order) = 2 and substring(box_order,-1) in ('0','2','4','6','8');
alter table llx_bordereau_cheque modify number integer;

View File

@ -27,7 +27,7 @@ create table llx_bordereau_cheque
rowid integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,
datec datetime, datec datetime,
date_bordereau date, date_bordereau date,
number mediumint ZEROFILL, number integer,
amount float(12,2), amount float(12,2),
nbcheque smallint UNSIGNED DEFAULT 0, nbcheque smallint UNSIGNED DEFAULT 0,
fk_bank_account integer, fk_bank_account integer,

View File

@ -1,20 +1,24 @@
-- phpMyAdmin SQL Dump -- ===================================================================
-- version 2.6.2-Debian-3sarge3 -- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- http://www.phpmyadmin.net --
-- -- This program is free software; you can redistribute it and/or modify
-- Serveur: localhost -- it under the terms of the GNU General Public License as published by
-- Généré le : Mercredi 20 Juin 2007 à 15:13 -- the Free Software Foundation; either version 2 of the License, or
-- Version du serveur: 4.0.24 -- (at your option) any later version.
-- Version de PHP: 4.3.10-19 --
-- -- This program is distributed in the hope that it will be useful,
-- Base de données: `dolidev` -- 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
-- Structure de la table `llx_osc_categories` -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$
-- $Source$
--
-- ===================================================================
CREATE TABLE llx_osc_categories ( CREATE TABLE llx_osc_categories (
rowid int(11) unsigned NOT NULL auto_increment, rowid int(11) unsigned NOT NULL auto_increment,

View File

@ -20,10 +20,10 @@
-- --
-- =================================================================== -- ===================================================================
CREATE TABLE IF NOT EXISTS `llx_osc_customer` ( CREATE TABLE llx_osc_customer (
`rowid` int(11) NOT NULL default '0', rowid int(11) NOT NULL default '0',
`datem` datetime default NULL, datem datetime default NULL,
`fk_soc` int(11) NOT NULL default '0', fk_soc int(11) NOT NULL default '0',
PRIMARY KEY (`rowid`), PRIMARY KEY (rowid),
UNIQUE KEY `fk_soc` (`fk_soc`) UNIQUE KEY fk_soc (fk_soc)
) TYPE=InnoDB COMMENT='Table transition client OSC - societe Dolibarr'; ) TYPE=InnoDB COMMENT='Table transition client OSC - societe Dolibarr';

View File

@ -20,10 +20,10 @@
-- --
-- =================================================================== -- ===================================================================
CREATE TABLE IF NOT EXISTS `llx_osc_order` ( CREATE TABLE llx_osc_order (
`rowid` int(11) NOT NULL default '0', rowid int(11) NOT NULL default '0',
`datem` datetime default NULL, datem datetime default NULL,
`fk_commande` int(11) NOT NULL default '0', fk_commande int(11) NOT NULL default '0',
PRIMARY KEY (`rowid`), PRIMARY KEY (rowid),
UNIQUE KEY `fk_commande` (`fk_commande`) UNIQUE KEY fk_commande (fk_commande)
) TYPE=InnoDB COMMENT='Table transition commande OSC - commande Dolibarr'; ) TYPE=InnoDB COMMENT='Table transition commande OSC - commande Dolibarr';

View File

@ -20,12 +20,12 @@
-- --
-- =================================================================== -- ===================================================================
CREATE TABLE IF NOT EXISTS `llx_osc_product` ( CREATE TABLE llx_osc_product (
`rowid` int(11) NOT NULL default '0', rowid int(11) NOT NULL default '0',
`datem` datetime default NULL, datem datetime default NULL,
`fk_product` int(11) NOT NULL default '0', fk_product int(11) NOT NULL default '0',
PRIMARY KEY (`rowid`), PRIMARY KEY (rowid),
UNIQUE KEY `fk_product` (`fk_product`) UNIQUE KEY fk_product (fk_product)
) TYPE=InnoDB COMMENT='Table transition produit OSC - produit Dolibarr'; ) TYPE=InnoDB COMMENT='Table transition produit OSC - produit Dolibarr';