Thread: SF.net SVN: postfixadmin: [113] trunk/DATABASE_MYSQL.TXT
Brought to you by:
christian_boltz,
gingerdog
From: <Gin...@us...> - 2007-10-02 12:22:38
|
Revision: 113 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=113&view=rev Author: GingerDog Date: 2007-10-02 05:22:38 -0700 (Tue, 02 Oct 2007) Log Message: ----------- fix broken MySQL Schema (thanks to cytdevel - http://sourceforge.net/forum/forum.php?thread_id=1836415&forum_id=676076) Modified Paths: -------------- trunk/DATABASE_MYSQL.TXT Modified: trunk/DATABASE_MYSQL.TXT =================================================================== --- trunk/DATABASE_MYSQL.TXT 2007-10-02 12:06:10 UTC (rev 112) +++ trunk/DATABASE_MYSQL.TXT 2007-10-02 12:22:38 UTC (rev 113) @@ -1,8 +1,6 @@ # # Postfix Admin -# by Mischa Peters <mischa at high5 dot net> -# Copyright (c) 2002 - 2005 High5! -# Licensed under GPL for more info check GPL-LICENSE.TXT +# Licensed under GPL for more info check LICENSE.TXT # # This is the complete MySQL database structure for Postfix Admin. @@ -25,19 +23,21 @@ # # Postfix / MySQL # + USE mysql; +CREATE DATABASE IF NOT EXISTS postfix; # Postfix user & password -INSERT INTO user (Host, User, Password) VALUES ('localhost','postfix',password('postfix')); -INSERT INTO db (Host, Db, User, Select_priv) VALUES ('localhost','postfix','postfix','Y'); +#INSERT INTO user (Host, User, Password) VALUES ('localhost','postfix',password('postfix')); # Postfix Admin user & password -INSERT INTO user (Host, User, Password) VALUES ('localhost','postfixadmin',password('postfixadmin')); -INSERT INTO db (Host, Db, User, Select_priv, Insert_priv, Update_priv, Delete_priv) VALUES ('localhost', 'postfix', 'postfixadmin', 'Y', 'Y', 'Y', 'Y'); +#INSERT INTO user (Host, User, Password) VALUES ('localhost','postfixadmin',password('postfixadmin')); +# Priviledges +#INSERT INTO db (Host, Db, User, Select_priv) VALUES ('localhost','postfix','postfix','Y'); +#INSERT INTO db (Host, Db, User, Select_priv, Insert_priv, Update_priv, Delete_priv) VALUES ('localhost', 'postfix', 'postfixadmin', 'Y', 'Y', 'Y', 'Y'); FLUSH PRIVILEGES; GRANT USAGE ON postfix.* TO postfix@localhost; GRANT SELECT, INSERT, DELETE, UPDATE ON postfix.* TO postfix@localhost; GRANT USAGE ON postfix.* TO postfixadmin@localhost; GRANT SELECT, INSERT, DELETE, UPDATE ON postfix.* TO postfixadmin@localhost; -CREATE DATABASE postfix; USE postfix; # @@ -49,7 +49,7 @@ `created` datetime NOT NULL default '0000-00-00 00:00:00', `modified` datetime NOT NULL default '0000-00-00 00:00:00', `active` tinyint(1) NOT NULL default '1', - PRIMARY KEY (`username`), + PRIMARY KEY (`username`) ) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Admins'; # @@ -62,7 +62,7 @@ `created` datetime NOT NULL default '0000-00-00 00:00:00', `modified` datetime NOT NULL default '0000-00-00 00:00:00', `active` tinyint(1) NOT NULL default '1', - PRIMARY KEY (`address`), + PRIMARY KEY (`address`) ) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Aliases'; # @@ -80,7 +80,7 @@ `created` datetime NOT NULL default '0000-00-00 00:00:00', `modified` datetime NOT NULL default '0000-00-00 00:00:00', `active` tinyint(1) NOT NULL default '1', - PRIMARY KEY (`domain`), + PRIMARY KEY (`domain`) ) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Domains'; # @@ -119,7 +119,7 @@ `created` datetime NOT NULL default '0000-00-00 00:00:00', `modified` datetime NOT NULL default '0000-00-00 00:00:00', `active` tinyint(1) NOT NULL default '1', - PRIMARY KEY (`username`), + PRIMARY KEY (`username`) ) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Mailboxes'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Gin...@us...> - 2007-10-31 19:31:26
|
Revision: 169 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=169&view=rev Author: GingerDog Date: 2007-10-31 12:31:30 -0700 (Wed, 31 Oct 2007) Log Message: ----------- DATABASE_MYSQL.TXT: use bigints for quota - as suggested by xpoint on irc Modified Paths: -------------- trunk/DATABASE_MYSQL.TXT Modified: trunk/DATABASE_MYSQL.TXT =================================================================== --- trunk/DATABASE_MYSQL.TXT 2007-10-31 18:24:40 UTC (rev 168) +++ trunk/DATABASE_MYSQL.TXT 2007-10-31 19:31:30 UTC (rev 169) @@ -73,8 +73,8 @@ `description` varchar(255) NOT NULL default '', `aliases` int(10) NOT NULL default '0', `mailboxes` int(10) NOT NULL default '0', - `maxquota` int(10) NOT NULL default '0', - `quota` int(10) NOT NULL default '0', + `maxquota` bigint(20) NOT NULL default '0', + `quota` bigint(20) NOT NULL default '0', `transport` varchar(255) default NULL, `backupmx` tinyint(1) NOT NULL default '0', `created` datetime NOT NULL default '0000-00-00 00:00:00', @@ -114,7 +114,7 @@ `password` varchar(255) NOT NULL default '', `name` varchar(255) NOT NULL default '', `maildir` varchar(255) NOT NULL default '', - `quota` int(10) NOT NULL default '0', + `quota` bigint(20) NOT NULL default '0', `domain` varchar(255) NOT NULL default '', `created` datetime NOT NULL default '0000-00-00 00:00:00', `modified` datetime NOT NULL default '0000-00-00 00:00:00', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-04 21:02:21
|
Revision: 196 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=196&view=rev Author: christian_boltz Date: 2007-11-04 13:02:26 -0800 (Sun, 04 Nov 2007) Log Message: ----------- - remove DROP TABLE statements - they can do more harm than good Modified Paths: -------------- trunk/DATABASE_MYSQL.TXT Modified: trunk/DATABASE_MYSQL.TXT =================================================================== --- trunk/DATABASE_MYSQL.TXT 2007-11-04 20:55:17 UTC (rev 195) +++ trunk/DATABASE_MYSQL.TXT 2007-11-04 21:02:26 UTC (rev 196) @@ -126,8 +126,6 @@ # # Vacation stuff ... # -DROP TABLE IF EXISTS vacation; -DROP TABLE IF EXISTS vacation_notification; CREATE TABLE vacation ( email varchar(255) NOT NULL default '', subject varchar(255) NOT NULL default '', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Gin...@us...> - 2008-04-10 10:18:39
|
Revision: 327 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=327&view=rev Author: GingerDog Date: 2008-04-10 03:18:46 -0700 (Thu, 10 Apr 2008) Log Message: ----------- DATABASE_MYSQL.TXT - see upgrade.php Removed Paths: ------------- trunk/DATABASE_MYSQL.TXT Deleted: trunk/DATABASE_MYSQL.TXT =================================================================== --- trunk/DATABASE_MYSQL.TXT 2008-04-10 10:18:11 UTC (rev 326) +++ trunk/DATABASE_MYSQL.TXT 2008-04-10 10:18:46 UTC (rev 327) @@ -1,177 +0,0 @@ -# -# Postfix Admin -# Licensed under GPL for more info check LICENSE.TXT -# -# -# To setup the MySQL database, do the following steps: -# - create a MySQL database -# CREATE DATABASE postfix; -# - create a MySQL user that has all permissions on this database: -# CREATE USER 'postfix'@'localhost' IDENTIFIED BY 'choose_a_password'; -# GRANT ALL PRIVILEGES ON `postfix` . * TO 'postfix'@'localhost'; -# - edit config.inc.php to suit your needs -# - run upgrade.php to create the needed tables (yes, the filename is chosen -# badly in this case ;-) -# - run setup.php - - - - - -/* - - *********************************************************************** - * everything below is probably outdated and should no longer be used. * - * Therefore it is commented out ;-) * - *********************************************************************** - - - - - - -# This is the complete MySQL database structure for Postfix Admin. -# If you are installing from scratch you can use this file otherwise you -# need to use the TABLE_CHANGES.TXT or TABLE_BACKUP_MX.TXT that comes with Postfix Admin. -# You can find these in DOCUMENTS/ - -# -# There are 2 entries for a database user in the file. -# One you can use for Postfix and one for Postfix Admin. -# -# If you run this file twice (2x) you will get an error on the user creation in MySQL. -# To go around this you can either comment the lines below "USE MySQL" until "USE postfix". -# Or you can remove the users from the database and run it again. -# -# You can create the database from the shell with: -# -# mysql -u root [-p] < DATABASE_MYSQL.TXT - -# -# Postfix / MySQL -# - -USE mysql; -CREATE DATABASE IF NOT EXISTS postfix; -# Postfix user & password -#INSERT INTO user (Host, User, Password) VALUES ('localhost','postfix',password('postfix')); -# Postfix Admin user & password -#INSERT INTO user (Host, User, Password) VALUES ('localhost','postfixadmin',password('postfixadmin')); -# Priviledges -#INSERT INTO db (Host, Db, User, Select_priv) VALUES ('localhost','postfix','postfix','Y'); -#INSERT INTO db (Host, Db, User, Select_priv, Insert_priv, Update_priv, Delete_priv) VALUES ('localhost', 'postfix', 'postfixadmin', 'Y', 'Y', 'Y', 'Y'); -FLUSH PRIVILEGES; -GRANT USAGE ON postfix.* TO postfix@localhost; -GRANT SELECT, INSERT, DELETE, UPDATE ON postfix.* TO postfix@localhost; -GRANT USAGE ON postfix.* TO postfixadmin@localhost; -GRANT SELECT, INSERT, DELETE, UPDATE ON postfix.* TO postfixadmin@localhost; -USE postfix; - -# -# Table structure for table admin -# -CREATE TABLE `admin` ( - `username` varchar(255) NOT NULL default '', - `password` varchar(255) NOT NULL default '', - `created` datetime NOT NULL default '0000-00-00 00:00:00', - `modified` datetime NOT NULL default '0000-00-00 00:00:00', - `active` tinyint(1) NOT NULL default '1', - PRIMARY KEY (`username`) -) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Admins'; - -# -# Table structure for table alias -# -CREATE TABLE `alias` ( - `address` varchar(255) NOT NULL default '', - `goto` text NOT NULL, - `domain` varchar(255) NOT NULL default '', - `created` datetime NOT NULL default '0000-00-00 00:00:00', - `modified` datetime NOT NULL default '0000-00-00 00:00:00', - `active` tinyint(1) NOT NULL default '1', - PRIMARY KEY (`address`) -) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Aliases'; - -# -# Table structure for table domain -# -CREATE TABLE `domain` ( - `domain` varchar(255) NOT NULL default '', - `description` varchar(255) NOT NULL default '', - `aliases` int(10) NOT NULL default '0', - `mailboxes` int(10) NOT NULL default '0', - `maxquota` bigint(20) NOT NULL default '0', - `quota` bigint(20) NOT NULL default '0', - `transport` varchar(255) default NULL, - `backupmx` tinyint(1) NOT NULL default '0', - `created` datetime NOT NULL default '0000-00-00 00:00:00', - `modified` datetime NOT NULL default '0000-00-00 00:00:00', - `active` tinyint(1) NOT NULL default '1', - PRIMARY KEY (`domain`) -) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Domains'; - -# -# Table structure for table domain_admins -# -CREATE TABLE `domain_admins` ( - `username` varchar(255) NOT NULL default '', - `domain` varchar(255) NOT NULL default '', - `created` datetime NOT NULL default '0000-00-00 00:00:00', - `active` tinyint(1) NOT NULL default '1', - KEY username (`username`) -) TYPE=MyISAM COMMENT='Postfix Admin - Domain Admins'; - -# -# Table structure for table log -# -CREATE TABLE `log` ( - `timestamp` datetime NOT NULL default '0000-00-00 00:00:00', - `username` varchar(255) NOT NULL default '', - `domain` varchar(255) NOT NULL default '', - `action` varchar(255) NOT NULL default '', - `data` varchar(255) NOT NULL default '', - KEY timestamp (`timestamp`) -) TYPE=MyISAM COMMENT='Postfix Admin - Log'; - -# -# Table structure for table mailbox -# -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 '', - `quota` bigint(20) NOT NULL default '0', - `domain` varchar(255) NOT NULL default '', - `created` datetime NOT NULL default '0000-00-00 00:00:00', - `modified` datetime NOT NULL default '0000-00-00 00:00:00', - `active` tinyint(1) NOT NULL default '1', - PRIMARY KEY (`username`) -) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Mailboxes'; - - -# -# Vacation stuff ... -# -CREATE TABLE vacation ( - email varchar(255) NOT NULL default '', - subject varchar(255) NOT NULL default '', - body text NOT NULL, - cache text NOT NULL, - domain varchar(255) NOT NULL default '', - created datetime NOT NULL default '0000-00-00 00:00:00', - active tinyint(4) NOT NULL default '1', - PRIMARY KEY (email), - KEY email (email) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci TYPE=InnoDB COMMENT='Postfix Admin - Virtual Vacation' ; - -# vacation_notification table - -CREATE TABLE vacation_notification ( - on_vacation varchar(255) NOT NULL, - notified varchar(255) NOT NULL, - notified_at timestamp NOT NULL default now(), - CONSTRAINT vacation_notification_pkey PRIMARY KEY(on_vacation, notified), - FOREIGN KEY (on_vacation) REFERENCES vacation(email) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci TYPE=InnoDB COMMENT='Postfix Admin - Virtual Vacation Notifications'; - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |