Skip to content

Commit a43d2e0

Browse files
Issue #4 - Fix constraint names
1 parent b77f379 commit a43d2e0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/create_tables.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ CREATE TABLE IF NOT EXISTS `alias` (
1717
`created` datetime NOT NULL DEFAULT '2000-01-01 00:00:00',
1818
`modified` datetime NOT NULL DEFAULT '2000-01-01 00:00:00',
1919
`active` tinyint(1) NOT NULL DEFAULT 1,
20-
PRIMARY KEY (`address`)
20+
UNIQUE KEY `address` (`address`)
2121
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Postfix Admin - Virtual Aliases';
2222

2323
CREATE TABLE IF NOT EXISTS `alias_domain` (
@@ -26,7 +26,7 @@ CREATE TABLE IF NOT EXISTS `alias_domain` (
2626
`created` datetime NOT NULL DEFAULT '2000-01-01 00:00:00',
2727
`modified` datetime NOT NULL DEFAULT '2000-01-01 00:00:00',
2828
`active` tinyint(1) NOT NULL DEFAULT 1,
29-
PRIMARY KEY (`alias_domain`)
29+
UNIQUE KEY `alias_domain` (`alias_domain`)
3030
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Postfix Admin - Domain Aliases';
3131

3232
CREATE TABLE IF NOT EXISTS `domain` (
@@ -41,7 +41,7 @@ CREATE TABLE IF NOT EXISTS `domain` (
4141
`created` datetime NOT NULL DEFAULT '2000-01-01 00:00:00',
4242
`modified` datetime NOT NULL DEFAULT '2000-01-01 00:00:00',
4343
`active` tinyint(1) NOT NULL DEFAULT 1,
44-
PRIMARY KEY (`domain`)
44+
UNIQUE KEY `domain` (`domain`)
4545
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Postfix Admin - Virtual Domains';
4646

4747
CREATE TABLE IF NOT EXISTS `mailbox` (
@@ -59,7 +59,7 @@ CREATE TABLE IF NOT EXISTS `mailbox` (
5959
`email_other` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
6060
`token` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
6161
`token_validity` datetime NOT NULL DEFAULT '2000-01-01 00:00:00',
62-
PRIMARY KEY (`username`)
62+
UNIQUE KEY `username` (`username`)
6363
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Postfix Admin - Virtual Mailboxes';
6464

6565
CREATE TABLE IF NOT EXISTS `tlspolicies` (

0 commit comments

Comments
 (0)