View Issue Details

IDProjectCategoryView StatusLast Update
0014852mantisbtinstallationpublic2014-12-08 00:33
ReporternikiAssigned Todregad 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Platformx86_64OSArchLinuxOS Version
Product Version1.2.11 
Target Version1.3.0-beta.1Fixed in Version1.3.0-beta.1 
Summary0014852: Installation fails during install with postgres as DB
Description

During installation of mantis in a PostgresDB, I got this error during install:

ERROR: column "redirect_delay" cannot be cast automatically to type integer
SQL state: 42804
Hint: Specify a USING expression to perform the conversion.

To resolve this, I had to make the following chnages to the SQL to get the install to finish correctly:

diff -Naur mantis-0.sql mantis-1.sql
--- mantis-0.sql 2012-10-23 05:47:41.824642741 +0200
+++ mantis-1.sql 2012-10-23 05:59:24.236579980 +0200
@@ -300,7 +300,7 @@
advanced_view BOOLEAN DEFAULT '0' NOT NULL,
advanced_update BOOLEAN DEFAULT '0' NOT NULL,
refresh_delay INTEGER DEFAULT 0 NOT NULL,
-redirect_delay BOOLEAN DEFAULT '0' NOT NULL,
+redirect_delay INTEGER DEFAULT 0 NOT NULL,
bugnote_order VARCHAR(4) DEFAULT 'ASC' NOT NULL,
email_on_new BOOLEAN DEFAULT '0' NOT NULL,
email_on_assigned BOOLEAN DEFAULT '0' NOT NULL,
@@ -442,12 +442,6 @@
PRIMARY KEY (basename)
);

-ALTER TABLE mantis_user_pref_table ALTER COLUMN redirect_delay TYPE INTEGER;

-ALTER TABLE mantis_user_pref_table ALTER COLUMN redirect_delay SET DEFAULT 0;

-ALTER TABLE mantis_user_pref_table ALTER COLUMN redirect_delay SET NOT NULL;

ALTER TABLE mantis_custom_field_table ALTER COLUMN possible_values TYPE TEXT;

ALTER TABLE mantis_custom_field_table ALTER COLUMN possible_values SET DEFAULT '';

Steps To Reproduce

During normal install choose to run the SQL manually, and copy/paste the listed SQL in to PGAdmin (or use the commandline), and you get the above mentioned error during execution.

TagsNo tags attached.

Activities

niki

niki

2012-10-23 00:13

reporter  

mantis.err (322 bytes)
niki

niki

2012-10-23 00:14

reporter  

mantis-0.sql (33,393 bytes)
niki

niki

2012-10-23 00:15

reporter  

mantis-1.sql (33,156 bytes)
niki

niki

2012-10-23 00:15

reporter  

mantis.diff (1,049 bytes)
--- mantis-0.sql	2012-10-23 05:47:41.824642741 +0200
+++ mantis-1.sql	2012-10-23 05:59:24.236579980 +0200
@@ -300,7 +300,7 @@
 advanced_view            BOOLEAN DEFAULT '0' NOT NULL,
 advanced_update          BOOLEAN DEFAULT '0' NOT NULL,
 refresh_delay            INTEGER DEFAULT 0 NOT NULL,
-redirect_delay           BOOLEAN DEFAULT '0' NOT NULL,
+redirect_delay           INTEGER DEFAULT 0 NOT NULL,
 bugnote_order            VARCHAR(4) DEFAULT 'ASC' NOT NULL,
 email_on_new             BOOLEAN DEFAULT '0' NOT NULL,
 email_on_assigned        BOOLEAN DEFAULT '0' NOT NULL,
@@ -442,12 +442,6 @@
                  PRIMARY KEY (basename)
 );
 
-ALTER TABLE mantis_user_pref_table ALTER COLUMN redirect_delay TYPE INTEGER;
-
-ALTER TABLE mantis_user_pref_table ALTER COLUMN redirect_delay SET DEFAULT 0;
-
-ALTER TABLE mantis_user_pref_table ALTER COLUMN redirect_delay SET NOT NULL;
-
 ALTER TABLE mantis_custom_field_table ALTER COLUMN possible_values TYPE TEXT;
 
 ALTER TABLE mantis_custom_field_table ALTER COLUMN possible_values SET DEFAULT '';
mantis.diff (1,049 bytes)
niki

niki

2012-10-23 00:18

reporter   ~0033300

mantis-0.sql is the original SQL pasted from the install, just added begin/commit to it, and mantis-1.sql is the modified version used to install, and mantis.diff is the difference between the two.

niki

niki

2012-10-23 00:19

reporter   ~0033301

Last edited: 2012-10-23 00:21

View 2 revisions

But I was wondering why the installe is firest adding a table, and the later adds/modifies colums, instead of just creating the final one from the beginning.

So besides that, seemes like a smooth install :-)

dregad

dregad

2012-10-28 06:01

developer   ~0033318

There are known issues with PostgreSQL, related to the handling of booleans. On principle you shouldn't manually alter the schema, as it could break the ability to upgrade.

Would you be able and willing to test the installation process using the latest nightly build (1.2.12dev - download from http://www.mantisbt.org/builds/) and report the results here ?

I was wondering why the installe is firest adding a table, and the later
adds/modifies colums, instead of just creating the final one from the beginning.

This is to enable upgrades. Knowing the current schema version, the installer knows what changes need to be applied to bring it to the new version.

dregad

dregad

2014-07-07 11:19

developer   ~0040896

Can't reproduce this with latest master

Issue History

Date Modified Username Field Change
2012-10-23 00:13 niki New Issue
2012-10-23 00:13 niki File Added: mantis.err
2012-10-23 00:14 niki File Added: mantis-0.sql
2012-10-23 00:15 niki File Added: mantis-1.sql
2012-10-23 00:15 niki File Added: mantis.diff
2012-10-23 00:18 niki Note Added: 0033300
2012-10-23 00:19 niki Note Added: 0033301
2012-10-23 00:21 niki Note Edited: 0033301 View Revisions
2012-10-28 06:01 dregad Note Added: 0033318
2012-10-28 06:01 dregad Status new => acknowledged
2014-07-07 11:19 dregad Note Added: 0040896
2014-07-07 11:19 dregad Status acknowledged => resolved
2014-07-07 11:19 dregad Fixed in Version => 1.3.0-beta.1
2014-07-07 11:19 dregad Resolution open => fixed
2014-07-07 11:19 dregad Assigned To => dregad
2014-09-25 17:26 atrol Target Version => 1.3.0-beta.1
2014-11-07 12:38 vboctor Summary Installation failes during install with postgres as DB => Installation fails during install with postgres as DB
2014-12-08 00:33 vboctor Status resolved => closed