Skip to content

Commit

Permalink
Set a default value instead for a faster ALTER
Browse files Browse the repository at this point in the history
  • Loading branch information
jprenken committed Jan 11, 2025
1 parent 2920875 commit 857edbf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
-- +migrate Up
-- SQL in section 'Up' is executed when this migration is applied

ALTER TABLE `registrations` MODIFY COLUMN `LockCol` BIGINT(20) DEFAULT 0;
ALTER TABLE `registrations` ALTER COLUMN `LockCol` SET DEFAULT 0;

-- +migrate Down
-- SQL section 'Down' is executed when this migration is rolled back

ALTER TABLE `registrations` MODIFY COLUMN `LockCol` BIGINT(20) NOT NULL;
ALTER TABLE `registrations` ALTER COLUMN `LockCol` DROP DEFAULT;

0 comments on commit 857edbf

Please sign in to comment.