Skip to content
Snippets Groups Projects
Commit 2946deea authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

Fixed scanservice-error: a table lost its primarykey on derby

parent 47a61c72
No related branches found
No related tags found
No related merge requests found
...@@ -2,11 +2,14 @@ ...@@ -2,11 +2,14 @@
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<changeSet dbms="derby" author="b.ulrich" id="83c25119-cf41-42ab-b42f-370195f9de87"> <changeSet dbms="derby" author="b.ulrich" id="83c25119-cf41-42ab-b42f-370195f9de87">
<!--not null must be set in derby before adding a primary key constraint-->
<sql> <sql>
ALTER TABLE DOCUMENTTEMPLATE ADD COLUMN DOCUMENTTEMPLATEID_NEW CHAR(36); ALTER TABLE DOCUMENTTEMPLATE ADD COLUMN DOCUMENTTEMPLATEID_NEW CHAR(36);
UPDATE DOCUMENTTEMPLATE SET DOCUMENTTEMPLATEID_NEW=DOCUMENTTEMPLATEID; UPDATE DOCUMENTTEMPLATE SET DOCUMENTTEMPLATEID_NEW=DOCUMENTTEMPLATEID;
ALTER TABLE DOCUMENTTEMPLATE DROP COLUMN DOCUMENTTEMPLATEID; ALTER TABLE DOCUMENTTEMPLATE DROP COLUMN DOCUMENTTEMPLATEID;
RENAME COLUMN DOCUMENTTEMPLATE.DOCUMENTTEMPLATEID_NEW TO DOCUMENTTEMPLATEID; RENAME COLUMN DOCUMENTTEMPLATE.DOCUMENTTEMPLATEID_NEW TO DOCUMENTTEMPLATEID;
ALTER TABLE DOCUMENTTEMPLATE ALTER COLUMN DOCUMENTTEMPLATEID NOT NULL;
ALTER TABLE DOCUMENTTEMPLATE ADD CONSTRAINT PK_DOCUMENTTEMPLATE_DOCUMENTTEMPLATEID PRIMARY KEY (DOCUMENTTEMPLATEID);
</sql> </sql>
</changeSet> </changeSet>
......
...@@ -8382,13 +8382,13 @@ ...@@ -8382,13 +8382,13 @@
<entityFieldDb> <entityFieldDb>
<name>DOCUMENTTEMPLATEID</name> <name>DOCUMENTTEMPLATEID</name>
<dbName></dbName> <dbName></dbName>
<primaryKey v="false" /> <primaryKey v="true" />
<columnType v="1" /> <columnType v="1" />
<size v="36" /> <size v="36" />
<scale v="0" /> <scale v="0" />
<notNull v="false" /> <notNull v="true" />
<isUnique v="false" /> <isUnique v="true" />
<index v="false" /> <index v="true" />
<documentation></documentation> <documentation></documentation>
<title></title> <title></title>
<description></description> <description></description>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment