eclipse / hawkbit

Eclipse hawkBit™
https://projects.eclipse.org/projects/iot.hawkbit
Eclipse Public License 2.0
445 stars 184 forks source link

MSSQL Migration Error #1661

Open meladon1337 opened 5 months ago

meladon1337 commented 5 months ago

When applying the migrations to a azure mssql Database the following migration does not work. https://github.com/eclipse/hawkbit/blob/master/hawkbit-repository/hawkbit-repository-jpa/src/main/resources/db/migration/SQL_SERVER/V1_12_16__add_action_initiated_by___SQL_SERVER.sql

Fixed the issue with the "GO;" because it does not work in one statement: ALTER TABLE sp_action ADD initiated_by VARCHAR(64) NOT NULL CONSTRAINT DF_SpAction_InitiatedBy DEFAULT ''; GO; ALTER TABLE sp_action DROP CONSTRAINT DF_SpAction_InitiatedBy; ALTER TABLE sp_target_filter_query ADD auto_assign_initiated_by VARCHAR(64);