Skip to content

Instantly share code, notes, and snippets.

@bryanisimo
Last active March 25, 2018 08:40
Show Gist options
  • Select an option

  • Save bryanisimo/44e9b2c36024000b5c4ecdc9c6188029 to your computer and use it in GitHub Desktop.

Select an option

Save bryanisimo/44e9b2c36024000b5c4ecdc9c6188029 to your computer and use it in GitHub Desktop.
Creating tables for postfix
CREATE TABLE `users` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`active` tinyint(1) NOT NULL,
`email` varchar(255) NOT NULL DEFAULT '',
`pwd` varchar(255) NOT NULL DEFAULT '',
`quota` INT(10) DEFAULT '10485760',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `domains` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`domain` varchar(255) NOT NULL DEFAULT '',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `forwardings` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`source` varchar(255) NOT NULL DEFAULT '',
`destination` varchar(255) NOT NULL DEFAULT '',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `transport` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`transport` varchar(255) NOT NULL DEFAULT '',
`domain` varchar(255) NOT NULL DEFAULT '',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment