[mirrorbrain-commits] [opensuse-svn] r6321 - trunk/tools/download-redirector-v2/sql

From: Novell Forge SVN <noreply_at_novell.com>
Date: Mon, 2 Feb 2009 15:19:48 -0700 (MST)
Author: poeml
Date: 2009-02-02 15:19:45 -0700 (Mon, 02 Feb 2009)
New Revision: 6321

Modified:
   trunk/tools/download-redirector-v2/sql/mirrorbrain-mysql.sql
Log:
MirrorBrain database scheme for MySQL: 
- reorder some fields in more logical order
- add a few notes about inconsistencies or other room for improvement


Modified: trunk/tools/download-redirector-v2/sql/mirrorbrain-mysql.sql
===================================================================
--- trunk/tools/download-redirector-v2/sql/mirrorbrain-mysql.sql	2009-02-02 21:02:06 UTC (rev 6320)
+++ trunk/tools/download-redirector-v2/sql/mirrorbrain-mysql.sql	2009-02-02 22:19:45 UTC (rev 6321)
_at_@ -1,14 +1,10 @@
 
 -- 
--- Database: `redirector`
+-- MirrorBrain Database scheme for MySQL
 -- 
 
 -- --------------------------------------------------------
 
--- 
--- Table structure of table `file`
--- 
-
 CREATE TABLE `file` (
   `id` int(11) unsigned NOT NULL auto_increment,
   `path` varchar(512) NOT NULL,
_at_@ -18,15 +14,13 @@
 
 -- --------------------------------------------------------
 
--- 
--- Table structure of table `file_server`
--- 
-
 CREATE TABLE `file_server` (
   `fileid` int(11) unsigned NOT NULL default '0',
   `serverid` int(11) unsigned NOT NULL default '0',
+-- timestamp_file: the default and update trigger are not used
   `timestamp_file` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
   `timestamp_scanner` timestamp NOT NULL default '0000-00-00 00:00:00',
+-- BUG: This index is a duplicate of file_server_fileid_serverid_idx
   KEY `fileid` (`fileid`,`serverid`),
   KEY `file_server_fileid_idx` (`fileid`),
   KEY `file_server_serverid_idx` (`serverid`),
_at_@ -35,45 +29,39 @@
 
 -- --------------------------------------------------------
 
--- 
--- Table structure of table `server`
--- 
-
 CREATE TABLE `server` (
   `id` int(11) unsigned NOT NULL auto_increment,
   `identifier` varchar(64) NOT NULL,
   `baseurl` varchar(128) NOT NULL,
   `baseurl_ftp` varchar(128) NOT NULL,
+-- inconsistently, baseurl_rsync can be null - we should get rid of this.
+  `baseurl_rsync` varchar(128) default NULL,
   `enabled` tinyint(1) NOT NULL default '0',
   `status_baseurl` tinyint(1) NOT NULL default '0',
-  `last_scan` timestamp NULL default NULL,
+-- region should be altered to char(2) - as we use it
   `region` varchar(10) default NULL,
   `country` char(2) default NULL,
   `score` int(11) default NULL,
   `scan_fpm` int(11) default NULL,
-  `baseurl_rsync` varchar(128) default NULL,
+  `last_scan` timestamp NULL default NULL,
   `comment` text,
+  `admin` text,
   `admin_email` text,
+  `operator_name` text NOT NULL,
+  `operator_url` text NOT NULL,
   `netblock` text,
-  `admin` text,
   `lat` float default NULL,
   `lng` float default NULL,
   `country_only` tinyint(1) default '0',
   `region_only` tinyint(1) default '0',
   `other_countries` text NOT NULL,
   `file_maxsize` int(11) NOT NULL default '0',
-  `operator_name` text NOT NULL,
-  `operator_url` text NOT NULL,
   PRIMARY KEY  (`id`),
   UNIQUE KEY `identifier` (`identifier`),
   KEY `server_enabled_status_baseurl_score_idx` (`enabled`,`status_baseurl`,`score`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
 
--- 
--- Table structure of table `marker`
--- 
-
 CREATE TABLE `marker` (
   `id` int(11) unsigned NOT NULL auto_increment,
   `subtree_name` varchar(128) NOT NULL,
_at_@ -82,10 +70,6 @@
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
 
--- 
--- Table structure of table `countries`
--- 
-
 CREATE TABLE `country` (
   `id` tinyint(1) NOT NULL auto_increment,
   `code` char(2) NOT NULL,

_______________________________________________
Opensuse-svn mailing list
Opensuse-svn_at_forge.novell.com
http://forge.novell.com/mailman/listinfo/opensuse-svn


_______________________________________________
mirrorbrain-commits mailing list

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Mon Feb 02 2009 - 22:20:26 GMT

This archive was generated by hypermail 2.3.0 : Thu Mar 25 2010 - 19:18:16 GMT