aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2011-02-04 17:09:31 +0100
committerStefan Kangas <stefankangas@gmail.com>2011-02-06 12:34:14 +0100
commitdaa2b2e1c7254b843b69c6857ea6186725f73310 (patch)
treeeb2d8537252334a380f01f618b08433141a8a548
parent36e90956a9c44d517fc0bfc01cf511693dce779a (diff)
Add SQL table descriptions
-rw-r--r--fripost-docs.org63
1 files changed, 60 insertions, 3 deletions
diff --git a/fripost-docs.org b/fripost-docs.org
index be97156..d629a37 100644
--- a/fripost-docs.org
+++ b/fripost-docs.org
@@ -290,8 +290,12 @@ Aptitude
*** Basic configuration of MySQL
**** Installing MySQL
- - sudo apt-get-install mysql-server
+ - sudo apt-get install mysql-server
- generate a long (25 characters) password for the mysql root user
+ - /etc/mysql/my.cnf
+:HIDDEN:
+skip-innodb
+:END:
**** Configuring the main IMAP server
@@ -312,9 +316,62 @@ mysql> describe log;
mysql> describe mailbox;
:END:
- - to set up the tables, use the following schema // FIXME: Add schema
+ - sudo mysql -u root -p --database=mail
:HIDDEN:
-
+DROP TABLE IF EXISTS `alias`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+CREATE TABLE `alias` (
+ `address` varchar(255) NOT NULL default '',
+ `goto` text NOT NULL,
+ `domain` varchar(255) NOT NULL default '',
+ `create_date` datetime NOT NULL default '0000-00-00 00:00:00',
+ `change_date` datetime NOT NULL default '0000-00-00 00:00:00',
+ `active` tinyint(4) NOT NULL default '1',
+ PRIMARY KEY (`address`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Virtual Aliases - mysql_virtual_\nalias_maps';
+SET character_set_client = @saved_cs_client;
+
+DROP TABLE IF EXISTS `domain`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+CREATE TABLE `domain` (
+ `domain` varchar(255) NOT NULL default '',
+ `description` varchar(255) NOT NULL default '',
+ `create_date` datetime NOT NULL default '0000-00-00 00:00:00',
+ `change_date` datetime NOT NULL default '0000-00-00 00:00:00',
+ `active` tinyint(4) NOT NULL default '1',
+ PRIMARY KEY (`domain`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Virtual Domains - mysql_virtual_\ndomains_maps';
+SET character_set_client = @saved_cs_client;
+
+DROP TABLE IF EXISTS `log`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+CREATE TABLE `log` (
+ `id` int(11) NOT NULL auto_increment,
+ `user` varchar(20) NOT NULL default '',
+ `event` text NOT NULL,
+ `date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM AUTO_INCREMENT=106 DEFAULT CHARSET=utf8 COMMENT='log table';
+SET character_set_client = @saved_cs_client;
+
+DROP TABLE IF EXISTS `mailbox`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+CREATE TABLE `mailbox` (
+ `username` varchar(255) NOT NULL default '',
+ `password` varchar(255) NOT NULL default '',
+ `name` varchar(255) NOT NULL default '',
+ `maildir` varchar(255) NOT NULL default '',
+ `domain` varchar(255) NOT NULL default '',
+ `create_date` datetime NOT NULL default '0000-00-00 00:00:00',
+ `change_date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+ `active` tinyint(4) NOT NULL default '1',
+ PRIMARY KEY (`username`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Virtual Mailboxes - mysql_virtua\nl_mailbox_maps';
+SET character_set_client = @saved_cs_client;
:END:
**** Configuring the MySQL replication