Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
d73635c3
Commit
d73635c3
authored
14 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
New: Upgrade process works with Postgresql
parent
5439973b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
ChangeLog
+11
-0
11 additions, 0 deletions
ChangeLog
htdocs/install/mysql/migration/2.9.0-3.0.0.sql
+9
-5
9 additions, 5 deletions
htdocs/install/mysql/migration/2.9.0-3.0.0.sql
htdocs/lib/databases/pgsql.lib.php
+8
-1
8 additions, 1 deletion
htdocs/lib/databases/pgsql.lib.php
with
28 additions
and
6 deletions
ChangeLog
+
11
−
0
View file @
d73635c3
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:
...
...
This diff is collapsed.
Click to expand it.
htdocs/install/mysql/migration/2.9.0-3.0.0.sql
+
9
−
5
View file @
d73635c3
...
@@ -5,13 +5,17 @@
...
@@ -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
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
htdocs/lib/databases/pgsql.lib.php
+
8
−
1
View file @
d73635c3
...
@@ -211,6 +211,13 @@ class DoliDb
...
@@ -211,6 +211,13 @@ 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
);
# 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 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
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment