disallow all null values in registrations table

This prevents weird bad things happening in the future.
This commit is contained in:
Jeff Hodges 2015-08-28 00:56:41 -07:00
parent 8f3cd5e446
commit c717b9f699
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
ALTER TABLE `registrations` MODIFY `contact` varchar(255) NOT NULL;
ALTER TABLE `registrations` MODIFY `agreement` varchar(255) NOT NULL;
ALTER TABLE `registrations` MODIFY `LockCol` bigint(20) NOT NULL;
-- +goose Down
-- SQL section 'Down' is executed when this migration is rolled back
ALTER TABLE `registrations` MODIFY `contact` varchar(255) DEFAULT NULL;
ALTER TABLE `registrations` MODIFY `agreement` varchar(255) DEFAULT NULL;
ALTER TABLE `registrations` MODIFY `LockCol` bigint(20) DEFAULT NULL;