Skip to content

Commit

Permalink
Empty table before adding primary key
Browse files Browse the repository at this point in the history
The addition of the primary key can cause problems for populated tables
due to duplicate entries. Therefore we delete the existing data before
adding the primary key.
  • Loading branch information
jrauh01 committed Jan 10, 2025
1 parent a700003 commit e766eb0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions schema/mysql-migrations/upgrade_59.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
DELETE FROM vspheredb_daemonlog;

ALTER TABLE vspheredb_daemonlog
ADD PRIMARY KEY (instance_uuid, ts_create);

Expand Down

0 comments on commit e766eb0

Please sign in to comment.