New: Upgrade process works with Postgresql
This commit is contained in:
parent
5439973b1e
commit
d73635c318
11
ChangeLog
11
ChangeLog
@ -1,5 +1,16 @@
|
|||||||
English Dolibarr ChangeLog
|
English Dolibarr ChangeLog
|
||||||
|
|
||||||
|
***** ChangeLog for 3.0 compared to 2.9 *****
|
||||||
|
|
||||||
|
For users:
|
||||||
|
- New: When sending supplier orders by mail, a text is predefined.
|
||||||
|
- New: Upgrade process works with Postgresql.
|
||||||
|
|
||||||
|
For developer:
|
||||||
|
- Qual: Renamed some fields into database to be more internationnal.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 2.9 compared to 2.8 *****
|
***** ChangeLog for 2.9 compared to 2.8 *****
|
||||||
|
|
||||||
For users:
|
For users:
|
||||||
|
|||||||
@ -5,13 +5,17 @@
|
|||||||
-- This file must be loaded by calling /install/index.php page
|
-- This file must be loaded by calling /install/index.php page
|
||||||
-- when current version is 2.8.0 or higher.
|
-- when current version is 2.8.0 or higher.
|
||||||
--
|
--
|
||||||
|
-- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol;
|
||||||
|
-- To rename a column: ALTER TABLE llx_table CHANGE oldname newname varchar(60);
|
||||||
|
-- To change type of field: ALTER TABLE llx_table MODIFY name varchar(60);
|
||||||
|
--
|
||||||
|
|
||||||
|
-- Add recuperableonly field
|
||||||
alter table llx_product add column recuperableonly integer NOT NULL DEFAULT '0' after tva_tx;
|
alter table llx_product add column recuperableonly integer NOT NULL DEFAULT '0' after tva_tx;
|
||||||
|
|
||||||
alter table llx_product_price add column recuperableonly integer NOT NULL DEFAULT '0' after tva_tx;
|
alter table llx_product_price add column recuperableonly integer NOT NULL DEFAULT '0' after tva_tx;
|
||||||
|
|
||||||
|
-- Rename envente into tosell and add tobuy
|
||||||
alter table llx_product change column envente tosell smallint DEFAULT 1;
|
alter table llx_product change column envente tosell tinyint DEFAULT 1;
|
||||||
alter table llx_product add column tobuy smallint DEFAULT 1 after tosell;
|
alter table llx_product add column tobuy tinyint DEFAULT 1 after tosell;
|
||||||
|
alter table llx_product_price change column envente tosell tinyint DEFAULT 1;
|
||||||
|
|
||||||
@ -211,7 +211,14 @@ class DoliDb
|
|||||||
# We remove start of requests "ALTER TABLE tablexxx" if this is a DROP INDEX
|
# We remove start of requests "ALTER TABLE tablexxx" if this is a DROP INDEX
|
||||||
$line=preg_replace('/ALTER TABLE [a-z0-9_]+ DROP INDEX/i','DROP INDEX',$line);
|
$line=preg_replace('/ALTER TABLE [a-z0-9_]+ DROP INDEX/i','DROP INDEX',$line);
|
||||||
|
|
||||||
# alter table add primary key (field1, field2 ...) -> We remove the primary key name not accepted by PostGreSQL
|
# Translate order to rename fields
|
||||||
|
if (preg_match('/ALTER TABLE ([a-z0-9_]+) CHANGE COLUMN ([a-z0-9_]+) ([a-z0-9_]+)(.*)$/i',$line,$reg))
|
||||||
|
{
|
||||||
|
$line = "-- ".$line." replaced by --\n";
|
||||||
|
$line.= "ALTER TABLE ".$reg[1]." RENAME COLUMN ".$reg[2]." TO ".$reg[3];
|
||||||
|
}
|
||||||
|
|
||||||
|
# alter table add primary key (field1, field2 ...) -> We remove the primary key name not accepted by PostGreSQL
|
||||||
# ALTER TABLE llx_dolibarr_modules ADD PRIMARY KEY pk_dolibarr_modules (numero, entity);
|
# ALTER TABLE llx_dolibarr_modules ADD PRIMARY KEY pk_dolibarr_modules (numero, entity);
|
||||||
if (preg_match('/ALTER\s+TABLE\s*(.*)\s*ADD\s+PRIMARY\s+KEY\s*(.*)\s*\((.*)$/i',$line,$reg))
|
if (preg_match('/ALTER\s+TABLE\s*(.*)\s*ADD\s+PRIMARY\s+KEY\s*(.*)\s*\((.*)$/i',$line,$reg))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user