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
24f71287
Commit
24f71287
authored
8 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix pb with postgresql
parent
80646593
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/core/modules/modReceiptPrinter.class.php
+2
-2
2 additions, 2 deletions
htdocs/core/modules/modReceiptPrinter.class.php
htdocs/install/mysql/migration/3.7.0-3.8.0.sql
+16
-9
16 additions, 9 deletions
htdocs/install/mysql/migration/3.7.0-3.8.0.sql
with
18 additions
and
11 deletions
htdocs/core/modules/modReceiptPrinter.class.php
+
2
−
2
View file @
24f71287
...
@@ -137,8 +137,8 @@ class modReceiptPrinter extends DolibarrModules
...
@@ -137,8 +137,8 @@ class modReceiptPrinter extends DolibarrModules
// Clean before activation
// Clean before activation
$this
->
remove
(
$options
);
$this
->
remove
(
$options
);
$sql
=
array
(
$sql
=
array
(
"CREATE TABLE IF NOT EXISTS llx_printer_receipt (rowid int
(11) NOT NULL
AUTO_INCREMENT, name varchar(128), fk_type int
(11)
, fk_profile int
(11)
, parameter varchar(128), entity int
(11), PRIMARY KEY (rowid)
) ENGINE=
I
nno
DB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
;"
,
"CREATE TABLE IF NOT EXISTS llx_printer_receipt (rowid int
eger
AUTO_INCREMENT
PRIMARY KEY
, name varchar(128), fk_type int
eger
, fk_profile int
eger
, parameter varchar(128), entity int
eger
) ENGINE=
i
nno
db
;"
,
"CREATE TABLE IF NOT EXISTS llx_printer_receipt_template (rowid int
(11) NOT NULL
AUTO_INCREMENT, name varchar(128), template text, entity int
(11), PRIMARY KEY (rowid)
) ENGINE=
I
nno
DB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
;"
,
"CREATE TABLE IF NOT EXISTS llx_printer_receipt_template (rowid int
eger
AUTO_INCREMENT
PRIMARY KEY
, name varchar(128), template text, entity int
eger
) ENGINE=
i
nno
db
;"
,
);
);
return
$this
->
_init
(
$sql
,
$options
);
return
$this
->
_init
(
$sql
,
$options
);
}
}
...
...
This diff is collapsed.
Click to expand it.
htdocs/install/mysql/migration/3.7.0-3.8.0.sql
+
16
−
9
View file @
24f71287
--
--
-- Be carefull to requests order.
-- Be carefull to requests order.
-- 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
3.8
.0 or higher.
-- when current version is
5.0
.0 or higher.
--
--
-- To rename a table: ALTER TABLE llx_table RENAME TO llx_table_new;
-- To rename a table: ALTER TABLE llx_table RENAME TO llx_table_new;
-- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol;
-- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol;
...
@@ -9,14 +9,20 @@
...
@@ -9,14 +9,20 @@
-- To drop a column: ALTER TABLE llx_table DROP COLUMN oldname;
-- To drop a column: ALTER TABLE llx_table DROP COLUMN oldname;
-- To change type of field: ALTER TABLE llx_table MODIFY COLUMN name varchar(60);
-- To change type of field: ALTER TABLE llx_table MODIFY COLUMN name varchar(60);
-- To drop a foreign key: ALTER TABLE llx_table DROP FOREIGN KEY fk_name;
-- To drop a foreign key: ALTER TABLE llx_table DROP FOREIGN KEY fk_name;
-- To restrict request to Mysql version x.y or more: -- VMYSQLx.y
-- To drop an index: -- VMYSQL4.0 DROP INDEX nomindex on llx_table
-- To restrict request to Pgsql version x.y or more: -- VPGSQLx.y
-- To drop an index: -- VPGSQL8.0 DROP INDEX nomindex
-- To make pk to be auto increment (mysql): VMYSQL4.3 ALTER TABLE llx_c_shipment_mode CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT;
-- To restrict request to Mysql version x.y minimum use -- VMYSQLx.y
-- To make pk to be auto increment (postgres): VPGSQL8.2 NOT POSSIBLE. MUST DELETE/CREATE TABLE
-- To restrict request to Pgsql version x.y minimum use -- VPGSQLx.y
-- To set a field as NULL: VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name DROP NOT NULL;
-- To make pk to be auto increment (mysql): -- VMYSQL4.3 ALTER TABLE llx_c_shipment_mode CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT;
-- To set a field as DEFAULT NULL: VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET DEFAULT NULL;
-- To make pk to be auto increment (postgres): -- VPGSQL8.2 NOT POSSIBLE. MUST DELETE/CREATE TABLE
-- To delete orphelins: VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
-- To set a field as NULL: -- VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN name varchar(60) NULL;
-- To delete orphelins: VPGSQL8.2 DELETE FROM llx_usergroup_user WHERE fk_user NOT IN (SELECT rowid from llx_user);
-- To set a field as NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name DROP NOT NULL;
-- To set a field as NOT NULL: -- VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN name varchar(60) NOT NULL;
-- To set a field as NOT NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET NOT NULL;
-- To set a field as default NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET DEFAULT NULL;
-- Note: fields with type BLOB/TEXT can't have default value.
-- -- VPGSQL8.2 DELETE FROM llx_usergroup_user WHERE fk_user NOT IN (SELECT rowid from llx_user);
-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
UPDATE
llx_facture_fourn
set
ref
=
rowid
where
ref
IS
NULL
;
UPDATE
llx_facture_fourn
set
ref
=
rowid
where
ref
IS
NULL
;
...
@@ -35,6 +41,7 @@ ALTER TABLE llx_societe_rib ADD COLUMN frstrecur varchar(16) DEFAULT 'FRST' AFTE
...
@@ -35,6 +41,7 @@ ALTER TABLE llx_societe_rib ADD COLUMN frstrecur varchar(16) DEFAULT 'FRST' AFTE
ALTER
TABLE
llx_cronjob
ADD
COLUMN
entity
integer
DEFAULT
0
;
ALTER
TABLE
llx_cronjob
ADD
COLUMN
entity
integer
DEFAULT
0
;
ALTER
TABLE
llx_cronjob
MODIFY
COLUMN
params
text
NULL
;
ALTER
TABLE
llx_cronjob
MODIFY
COLUMN
params
text
NULL
;
-- VPGSQL8.2 ALTER TABLE llx_cronjob ALTER COLUMN params DROP NOT NULL;
-- Loan
-- Loan
create
table
llx_loan
create
table
llx_loan
...
...
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