Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 8e215b8

Browse files
author
Dominik František Bučík
authored
fix: Fix migration script for MySQL
Adding default = 0 for ID columns breaks inserts. Insert will assign the default value as ID, therefore it will fail. That then results in UPDATE being executed, resulting in constant overwriting of the IDP/SP name.
1 parent c6a8e88 commit 8e215b8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

scripts/migrate_v6_mysql.sql

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
ALTER TABLE statistics_sums CHANGE idpId idp_id INT UNSIGNED NOT NULL DEFAULT 0;
2-
ALTER TABLE statistics_sums CHANGE spId sp_id INT UNSIGNED NOT NULL DEFAULT 0;
1+
ALTER TABLE statistics_sums CHANGE idpId idp_id INT UNSIGNED NOT NULL;
2+
ALTER TABLE statistics_sums CHANGE spId sp_id INT UNSIGNED NOT NULL;
33

4-
ALTER TABLE statistics_per_user CHANGE idpId idp_id INT UNSIGNED NOT NULL DEFAULT 0;
5-
ALTER TABLE statistics_per_user CHANGE spId sp_id INT UNSIGNED NOT NULL DEFAULT 0;
4+
ALTER TABLE statistics_per_user CHANGE idpId idp_id INT UNSIGNED NOT NULL;
5+
ALTER TABLE statistics_per_user CHANGE spId sp_id INT UNSIGNED NOT NULL;
66

7-
ALTER TABLE statistics_idp CHANGE idpId idp_id INT UNSIGNED NOT NULL DEFAULT 0;
7+
ALTER TABLE statistics_idp CHANGE idpId idp_id INT UNSIGNED NOT NULL;
88

9-
ALTER TABLE statistics_sp CHANGE spId sp_id INT UNSIGNED NOT NULL DEFAULT 0;
9+
ALTER TABLE statistics_sp CHANGE spId sp_id INT UNSIGNED NOT NULL;

0 commit comments

Comments
 (0)