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 @@
<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">
<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>
ALTER TABLE DOCUMENTTEMPLATE ADD COLUMN DOCUMENTTEMPLATEID_NEW CHAR(36);
UPDATE DOCUMENTTEMPLATE SET DOCUMENTTEMPLATEID_NEW=DOCUMENTTEMPLATEID;
ALTER TABLE DOCUMENTTEMPLATE DROP COLUMN 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>
</changeSet>
......
......@@ -8382,13 +8382,13 @@
<entityFieldDb>
<name>DOCUMENTTEMPLATEID</name>
<dbName></dbName>
<primaryKey v="false" />
<primaryKey v="true" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<notNull v="true" />
<isUnique v="true" />
<index v="true" />
<documentation></documentation>
<title></title>
<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