Startup database not working in MSSQL/Oracle
Trying to startup dotcms using the Starter database in MSSQL, throws error generating multi_tree table. As a result the database is incomplete , and dotcms cannot start because of missing tables
Expected Behavior
All database tables should be created and dotcms starts up correctly.
Current Behavior
Error: [16/02/18 14:54:11:688 CST] FATAL runalways.Task00001LoadSchema: Error: Cannot define PRIMARY KEY constraint on nullable column in table 'multitree'.while trying to execute create table multitree ( child NVARCHAR(36) not null, parent1 NVARCHAR(36) not null, parent2 NVARCHAR(36) not null, relationtype NVARCHAR(64) null, treeorder int null, primary key (child, parent1, parent2, relationtype) ) processed 134 statements com.microsoft.sqlserver.jdbc.SQLServerException: Cannot define PRIMARY KEY constraint on nullable column in table 'multitree'.
Possible Solution
multitree.relationtype should be Not null for MSSQL/Oracle to admit it as Primary Key
Steps to Reproduce (for bugs)
- Using latest master
- Create new database dotcms in MSSQL
- run dotcms
Your Environment
- dotCMS version used: latest master
- Browser Name and version:
- Operating System and version:
- Application Server and version:
- Java Brand and version:
- Database and version: MSSQL Server
- Application module (if apply):
Task Task04345ChangeMultiTreePrimaryKey is not needed. Please remove.
Also alter task Task04315UpdateMultiTreePK to alter column relation_type to be not null for every db. @acurionedotcms
Needs work. Dotcms instance starts up correctly however task 4345 is still showing in db with starter data if you run select * from db_version. Win7 Pro SP1 / SQLServer 2012 / Chrome v64 / Tomcat 8 / Java 8 /