-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ZCS-11064: add migration script for zimbra.zmg_devices table
- Loading branch information
1 parent
7dbb55e
commit d9e9342
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/perl | ||
# | ||
# ***** BEGIN LICENSE BLOCK ***** | ||
# Zimbra Collaboration Suite Server | ||
# Copyright (C) 2015, 2016 Synacor, Inc. | ||
# | ||
# This program is free software: you can redistribute it and/or modify it under | ||
# the terms of the GNU General Public License as published by the Free Software Foundation, | ||
# version 2 of the License. | ||
# | ||
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; | ||
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
# See the GNU General Public License for more details. | ||
# You should have received a copy of the GNU General Public License along with this program. | ||
# If not, see <https://www.gnu.org/licenses/>. | ||
# ***** END LICENSE BLOCK ***** | ||
# | ||
|
||
|
||
use strict; | ||
use Migrate; | ||
|
||
Migrate::verifySchemaVersion(114); | ||
|
||
my $sqlStmt = <<_SQL_; | ||
ALTER TABLE zmg_devices DROP PRIMARY KEY; | ||
ALTER TABLE zmg_devices ADD CONSTRAINT PK_zmg_devices PRIMARY KEY (mailbox_id, reg_id); | ||
ALTER TABLE zmg_devices ADD COLUMN send_mail_notification TINYINT(1) DEFAULT 1; | ||
ALTER TABLE zmg_devices ADD COLUMN send_reminder_notification TINYINT(1) DEFAULT 1; | ||
_SQL_ | ||
|
||
Migrate::runSql($sqlStmt); | ||
|
||
Migrate::updateSchemaVersion(114, 115); | ||
|
||
exit(0); |