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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
a9ba2f31
Commit
a9ba2f31
authored
10 years ago
by
Marcos García de La Fuente
Browse files
Options
Downloads
Patches
Plain Diff
Fix: [ bug #1810 ] [pgsql] Error while upgrading from 3.6 to 3.7
parent
e4c5aa30
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/core/db/pgsql.class.php
+2
-1
2 additions, 1 deletion
htdocs/core/db/pgsql.class.php
with
2 additions
and
1 deletion
htdocs/core/db/pgsql.class.php
+
2
−
1
View file @
a9ba2f31
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2012 Yann Droneaud <yann@droneaud.fr>
* Copyright (C) 2012 Yann Droneaud <yann@droneaud.fr>
* Copyright (C) 2012 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2012 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
*
*
* This program is free software; you can redistribute it and/or modify
* 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
* it under the terms of the GNU General Public License as published by
...
@@ -255,7 +256,7 @@ class DoliDBPgsql extends DoliDB
...
@@ -255,7 +256,7 @@ class DoliDBPgsql extends DoliDB
$newreg3
=
preg_replace
(
'/ NOT NULL/i'
,
''
,
$newreg3
);
$newreg3
=
preg_replace
(
'/ NOT NULL/i'
,
''
,
$newreg3
);
$newreg3
=
preg_replace
(
'/ NULL/i'
,
''
,
$newreg3
);
$newreg3
=
preg_replace
(
'/ NULL/i'
,
''
,
$newreg3
);
$newreg3
=
preg_replace
(
'/ DEFAULT 0/i'
,
''
,
$newreg3
);
$newreg3
=
preg_replace
(
'/ DEFAULT 0/i'
,
''
,
$newreg3
);
$newreg3
=
preg_replace
(
'/ DEFAULT \'[0-9a-zA-Z_@]*\'/i'
,
''
,
$newreg3
);
$newreg3
=
preg_replace
(
'/ DEFAULT \'
?
[0-9a-zA-Z_@]*\'
?
/i'
,
''
,
$newreg3
);
$line
.
=
"ALTER TABLE "
.
$reg
[
1
]
.
" ALTER COLUMN "
.
$reg
[
2
]
.
" TYPE "
.
$newreg3
;
$line
.
=
"ALTER TABLE "
.
$reg
[
1
]
.
" ALTER COLUMN "
.
$reg
[
2
]
.
" TYPE "
.
$newreg3
;
// TODO Add alter to set default value or null/not null if there is this in $reg[3]
// TODO Add alter to set default value or null/not null if there is this in $reg[3]
}
}
...
...
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