diff options
Diffstat (limited to 'server/store/migrations/mysql')
-rw-r--r-- | server/store/migrations/mysql/20180807224200_new_primary_key.sql | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/server/store/migrations/mysql/20180807224200_new_primary_key.sql b/server/store/migrations/mysql/20180807224200_new_primary_key.sql new file mode 100644 index 0000000..ed6a3c2 --- /dev/null +++ b/server/store/migrations/mysql/20180807224200_new_primary_key.sql @@ -0,0 +1,11 @@ +-- +migrate Up +ALTER TABLE `issued_certs` + DROP PRIMARY KEY, + ADD COLUMN `id` INT PRIMARY KEY AUTO_INCREMENT FIRST, + ADD UNIQUE INDEX `idx_key_id` (`key_id`); + +-- +migrate Down +ALTER TABLE `issued_certs` + DROP PRIMARY KEY, + DROP COLUMN `id`, + ADD PRIMARY KEY (`key_id`); |