diff --git a/db/versions/10881-greenHydrangea/00-alterTableNotification.sql b/db/versions/10881-greenHydrangea/00-alterTableNotification.sql new file mode 100644 index 000000000..068d77839 --- /dev/null +++ b/db/versions/10881-greenHydrangea/00-alterTableNotification.sql @@ -0,0 +1 @@ +ALTER TABLE util.notification MODIFY COLUMN id int(11) auto_increment NOT NULL; diff --git a/db/versions/10881-greenHydrangea/01-notification.vn.sql b/db/versions/10881-greenHydrangea/01-notification.vn.sql index 1d6620c29..6c9152ec7 100644 --- a/db/versions/10881-greenHydrangea/01-notification.vn.sql +++ b/db/versions/10881-greenHydrangea/01-notification.vn.sql @@ -1,8 +1,7 @@ -SET @MaxId = (SELECT MAX(id)+1 from util.notification n); -INSERT IGNORE INTO util.notification (`id`, `name`,`description`) +INSERT IGNORE INTO util.notification ( `name`,`description`) VALUES -(@MaxId, 'zone-included','An email to notify zoneCollisions'); - +( 'zone-included','An email to notify zoneCollisions'); +SET @MaxId = LAST_INSERT_ID(); INSERT IGNORE INTO util.notificationSubscription (notificationFk,userFk) VALUES( @MaxId, (SELECT id from `account`.`user` where name = "system"));