Installer fails to create tables on certain databases due to 'dbdefault' behaviors


The best approach for this would be to add the dbdefaults programmatically instead of trying to deal with different databases.

The installer fails when creating the tables in the database, postgres error log output below :-

ERROR: column "isactive" is of type boolean but default expression is of type integer
HINT: You will need to rewrite or cast the expression.
STATEMENT: create table cb_author (authorID int4 not null, firstName varchar(100) not null, lastName varchar(100) not null, email varchar(255) not null, username varchar(100) not null unique, password varchar(100) not null, isActive bool default 0 not null, lastLogin timestamp, createdDate timestamp not null, biography text, preferences text, FK_roleID int4 not null, primary key (authorID))

Looks to be due to the dbdefault on the boolean properties of models, if the models are changed to have dbdefault="true" or dbdefault="false" instead of dbdefault="1" or dbdefault="0" the installer creates the tables successfully.



Luis Majano


Ben Brown



Fix versions

Affects versions