Advertisement
AlexWebDevelop

MailQueue database

Mar 20th, 2019
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 3.27 KB | None | 0 0
  1. -- phpMyAdmin SQL Dump
  2. -- version 4.7.4
  3. -- https://www.phpmyadmin.net/
  4.  
  5. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  6. SET AUTOCOMMIT = 0;
  7. START TRANSACTION;
  8. SET time_zone = "+00:00";
  9.  
  10. --
  11. -- Database: `mailqueue`
  12. --
  13. CREATE DATABASE IF NOT EXISTS `mailqueue` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
  14. USE `mailqueue`;
  15.  
  16. -- --------------------------------------------------------
  17.  
  18. --
  19. -- table `attachments`
  20. --
  21.  
  22. CREATE TABLE `attachments` (
  23.   `attachment_id` int(10) UNSIGNED NOT NULL,
  24.   `attachment_queue_id` int(10) UNSIGNED NOT NULL,
  25.   `attachment_file` varchar(255) NOT NULL,
  26.   `attachment_name` varchar(255) NOT NULL DEFAULT ''
  27. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  28.  
  29. -- --------------------------------------------------------
  30.  
  31. --
  32. -- table `cc`
  33. --
  34.  
  35. CREATE TABLE `cc` (
  36.   `cc_id` int(10) UNSIGNED NOT NULL,
  37.   `cc_queue_id` int(10) UNSIGNED NOT NULL,
  38.   `cc_address` varchar(255) NOT NULL,
  39.   `ccn` tinyint(1) UNSIGNED NOT NULL DEFAULT '0'
  40. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  41.  
  42. -- --------------------------------------------------------
  43.  
  44. --
  45. -- table `queue`
  46. --
  47.  
  48. CREATE TABLE `queue` (
  49.   `queue_id` int(10) UNSIGNED NOT NULL,
  50.   `queue_app_id` int(10) UNSIGNED NOT NULL,
  51.   `queue_from` varchar(255) NOT NULL,
  52.   `queue_recipient` varchar(255) NOT NULL,
  53.   `queue_subject` varchar(255) NOT NULL DEFAULT '',
  54.   `queue_text_body` text NOT NULL,
  55.   `queue_html_body` text NOT NULL,
  56.   `queue_priority` tinyint(3) UNSIGNED NOT NULL DEFAULT '10',
  57.   `queue_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  58.   `queue_schedule` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
  59. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  60.  
  61. -- --------------------------------------------------------
  62.  
  63. --
  64. -- table `sent`
  65. --
  66.  
  67. CREATE TABLE `sent` (
  68.   `sent_id` int(10) UNSIGNED NOT NULL,
  69.   `sent_app_id` int(10) UNSIGNED NOT NULL,
  70.   `sent_from` varchar(255) NOT NULL,
  71.   `sent_recipient` varchar(255) NOT NULL,
  72.   `sent_subject` varchar(255) NOT NULL,
  73.   `sent_text_body` text NOT NULL,
  74.   `sent_html_body` text NOT NULL,
  75.   `sent_priority` tinyint(3) UNSIGNED NOT NULL,
  76.   `sent_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  77.   `sent_sent` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
  78. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  79.  
  80. --
  81. -- Indexes
  82. --
  83.  
  84. --
  85. -- table `attachments`
  86. --
  87. ALTER TABLE `attachments`
  88.   ADD PRIMARY KEY (`attachment_id`),
  89.   ADD KEY `attachment_queue_id` (`attachment_queue_id`);
  90.  
  91. --
  92. -- table `cc`
  93. --
  94. ALTER TABLE `cc`
  95.   ADD PRIMARY KEY (`cc_id`),
  96.   ADD KEY `cc_queue_id` (`cc_queue_id`);
  97.  
  98. --
  99. -- table `queue`
  100. --
  101. ALTER TABLE `queue`
  102.   ADD PRIMARY KEY (`queue_id`),
  103.   ADD KEY `queue_schedule` (`queue_schedule`),
  104.   ADD KEY `queue_app_id` (`queue_app_id`);
  105.  
  106. --
  107. -- table `sent`
  108. --
  109. ALTER TABLE `sent`
  110.   ADD PRIMARY KEY (`sent_id`),
  111.   ADD KEY `sent_sent` (`sent_sent`) USING BTREE;
  112.  
  113. --
  114. -- AUTO_INCREMENT
  115. --
  116.  
  117. --
  118. -- table `attachments`
  119. --
  120. ALTER TABLE `attachments`
  121.   MODIFY `attachment_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  122.  
  123. --
  124. -- table `cc`
  125. --
  126. ALTER TABLE `cc`
  127.   MODIFY `cc_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  128.  
  129. --
  130. -- table `queue`
  131. --
  132. ALTER TABLE `queue`
  133.   MODIFY `queue_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  134.  
  135. --
  136. -- table `sent`
  137. --
  138. ALTER TABLE `sent`
  139.   MODIFY `sent_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  140. COMMIT;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement