From 4c13987e9266aa170cb7b2882d5f8579f262b3bb Mon Sep 17 00:00:00 2001
From: Tim Almdal <tnalmdal@shaw.ca>
Date: Sun, 18 Jan 2009 07:18:41 +0000
Subject: Change the database unload to unload all the tables instead of
 fooling around with individual tables.

---
 installer/data/install.sql | 141 +++++++++++++++++++++++++--------------------
 1 file changed, 77 insertions(+), 64 deletions(-)

(limited to 'installer/data/install.sql')

diff --git a/installer/data/install.sql b/installer/data/install.sql
index 497f30b4..77c8d87f 100644
--- a/installer/data/install.sql
+++ b/installer/data/install.sql
@@ -1,13 +1,3 @@
-DROP TABLE IF EXISTS `sessions`;
-SET @saved_cs_client     = @@character_set_client;
-SET character_set_client = utf8;
-CREATE TABLE `sessions` (
-  `session_id` varchar(127) NOT NULL,
-  `last_activity` int(10) unsigned NOT NULL,
-  `data` text NOT NULL,
-  PRIMARY KEY  (`session_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-SET character_set_client = @saved_cs_client;
 DROP TABLE IF EXISTS `access_caches`;
 SET @saved_cs_client     = @@character_set_client;
 SET character_set_client = utf8;
@@ -38,6 +28,35 @@ CREATE TABLE `access_intents` (
 ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
 SET character_set_client = @saved_cs_client;
 INSERT INTO `access_intents` VALUES (1,1,1,1,0,1,1,1);
+DROP TABLE IF EXISTS `comments`;
+SET @saved_cs_client     = @@character_set_client;
+SET character_set_client = utf8;
+CREATE TABLE `comments` (
+  `author_id` int(9) default NULL,
+  `created` int(9) NOT NULL,
+  `guest_email` varchar(128) default NULL,
+  `guest_name` varchar(128) default NULL,
+  `guest_url` varchar(255) default NULL,
+  `id` int(9) NOT NULL auto_increment,
+  `item_id` int(9) NOT NULL,
+  `server_http_accept_charset` varchar(64) default NULL,
+  `server_http_accept_encoding` varchar(64) default NULL,
+  `server_http_accept_language` varchar(64) default NULL,
+  `server_http_accept` varchar(128) default NULL,
+  `server_http_connection` varchar(64) default NULL,
+  `server_http_host` varchar(64) default NULL,
+  `server_http_referer` varchar(255) default NULL,
+  `server_http_user_agent` varchar(128) default NULL,
+  `server_query_string` varchar(64) default NULL,
+  `server_remote_addr` varchar(32) default NULL,
+  `server_remote_host` varchar(64) default NULL,
+  `server_remote_port` varchar(16) default NULL,
+  `state` char(15) default 'unpublished',
+  `text` text,
+  `updated` int(9) NOT NULL,
+  PRIMARY KEY  (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+SET character_set_client = @saved_cs_client;
 DROP TABLE IF EXISTS `graphics_rules`;
 SET @saved_cs_client     = @@character_set_client;
 SET character_set_client = utf8;
@@ -52,6 +71,29 @@ CREATE TABLE `graphics_rules` (
 ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
 SET character_set_client = @saved_cs_client;
 INSERT INTO `graphics_rules` VALUES (1,100,'core','thumb','resize','a:3:{s:5:\"width\";i:200;s:6:\"height\";i:200;s:6:\"master\";i:2;}'),(2,100,'core','resize','resize','a:3:{s:5:\"width\";i:640;s:6:\"height\";i:480;s:6:\"master\";i:2;}');
+DROP TABLE IF EXISTS `groups`;
+SET @saved_cs_client     = @@character_set_client;
+SET character_set_client = utf8;
+CREATE TABLE `groups` (
+  `id` int(9) NOT NULL auto_increment,
+  `name` char(64) default NULL,
+  `special` tinyint(1) default '0',
+  PRIMARY KEY  (`id`),
+  UNIQUE KEY `name` (`name`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
+SET character_set_client = @saved_cs_client;
+INSERT INTO `groups` VALUES (1,'Everybody',1),(2,'Registered Users',1);
+DROP TABLE IF EXISTS `groups_users`;
+SET @saved_cs_client     = @@character_set_client;
+SET character_set_client = utf8;
+CREATE TABLE `groups_users` (
+  `group_id` int(9) NOT NULL,
+  `user_id` int(9) NOT NULL,
+  PRIMARY KEY  (`group_id`,`user_id`),
+  UNIQUE KEY `user_id` (`user_id`,`group_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+SET character_set_client = @saved_cs_client;
+INSERT INTO `groups_users` VALUES (1,1),(1,2),(2,2);
 DROP TABLE IF EXISTS `incoming_translations`;
 SET @saved_cs_client     = @@character_set_client;
 SET character_set_client = utf8;
@@ -118,6 +160,7 @@ CREATE TABLE `logs` (
   PRIMARY KEY  (`id`)
 ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
 SET character_set_client = @saved_cs_client;
+INSERT INTO `logs` VALUES (1,'module','','Installed module core','http://sandbox.timalmdal.com:8080/gallery3/index.php/welcome',1,1232112015,'http://sandbox.timalmdal.com:8080/gallery3/index.php/welcome/install/core',0),(2,'module','','Installed module user','http://sandbox.timalmdal.com:8080/gallery3/index.php/welcome',1,1232112019,'http://sandbox.timalmdal.com:8080/gallery3/index.php/welcome/install/user',1),(3,'module','','Installed module comment','http://sandbox.timalmdal.com:8080/gallery3/index.php/welcome',1,1232113208,'http://sandbox.timalmdal.com:8080/gallery3/index.php/welcome/install/comment',1),(4,'module','','Installed module akismet','http://sandbox.timalmdal.com:8080/gallery3/index.php/welcome',1,1232113211,'http://sandbox.timalmdal.com:8080/gallery3/index.php/welcome/install/akismet',1),(5,'user','','User admin logged in','http://sandbox.timalmdal.com:1955/gallery3/index.php/albums/1',2,1232172351,'http://sandbox.timalmdal.com:1955/gallery3/index.php/login',2);
 DROP TABLE IF EXISTS `messages`;
 SET @saved_cs_client     = @@character_set_client;
 SET character_set_client = utf8;
@@ -155,6 +198,17 @@ CREATE TABLE `permissions` (
 ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
 SET character_set_client = @saved_cs_client;
 INSERT INTO `permissions` VALUES (1,'view','View'),(2,'view_full','View Full Size'),(3,'edit','Edit');
+DROP TABLE IF EXISTS `sessions`;
+SET @saved_cs_client     = @@character_set_client;
+SET character_set_client = utf8;
+CREATE TABLE `sessions` (
+  `session_id` varchar(127) NOT NULL,
+  `last_activity` int(10) unsigned NOT NULL,
+  `data` text NOT NULL,
+  PRIMARY KEY  (`session_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+SET character_set_client = @saved_cs_client;
+INSERT INTO `sessions` VALUES ('7d414ede0f86afc6079a90e424b51c41',1232179528,'c2Vzc2lvbl9pZHxzOjMyOiI3ZDQxNGVkZTBmODZhZmM2MDc5YTkwZTQyNGI1MWM0MSI7dG90YWxfaGl0c3xpOjc0O19rZl9mbGFzaF98YTowOnt9dXNlcl9hZ2VudHxzOjkwOiJNb3ppbGxhLzUuMCAoV2luZG93czsgVTsgV2luZG93cyBOVCA1LjE7IGVuLVVTOyBydjoxLjkuMC41KSBHZWNrby8yMDA4MTIwMTIyIEZpcmVmb3gvMy4wLjUiO2lwX2FkZHJlc3N8czoxMzoiMjQuNjkuMjExLjEzNSI7bGFzdF9hY3Rpdml0eXxpOjEyMzIxNzk1MjE7dXNlcnxPOjEwOiJVc2VyX01vZGVsIjo2OntzOjE0OiIAKgBvYmplY3RfbmFtZSI7czo0OiJ1c2VyIjtzOjk6IgAqAG9iamVjdCI7YToxMDp7czoyOiJpZCI7aToyO3M6NDoibmFtZSI7czo1OiJhZG1pbiI7czo5OiJmdWxsX25hbWUiO3M6MjE6IkdhbGxlcnkgQWRtaW5pc3RyYXRvciI7czo4OiJwYXNzd29yZCI7czozNjoiU1VdNjMzMjY3NDhiNTAyNmI0ZDdiNWQ1YzhjODNhMjY2NzQzIjtzOjExOiJsb2dpbl9jb3VudCI7aToxO3M6MTA6Imxhc3RfbG9naW4iO2k6MTIzMjE3MjM1MTtzOjU6ImVtYWlsIjtOO3M6NToiYWRtaW4iO2k6MTtzOjU6Imd1ZXN0IjtpOjA7czozOiJ1cmwiO047fXM6MTA6IgAqAGNoYW5nZWQiO2E6MDp7fXM6OToiACoAbG9hZGVkIjtiOjE7czo4OiIAKgBzYXZlZCI7YjoxO3M6MTA6IgAqAHNvcnRpbmciO2E6MTp7czoyOiJpZCI7czozOiJhc2MiO319Y3NyZnxzOjMyOiI0ZTB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MzRhYjk5Y2NmOTRiMGEwMjhkNWI3ZWQiOw==');
 DROP TABLE IF EXISTS `tasks`;
 SET @saved_cs_client     = @@character_set_client;
 SET character_set_client = utf8;
@@ -183,60 +237,6 @@ CREATE TABLE `themes` (
 ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
 SET character_set_client = @saved_cs_client;
 INSERT INTO `themes` VALUES (1,'default',1),(2,'admin_default',1);
-DROP TABLE IF EXISTS `vars`;
-SET @saved_cs_client     = @@character_set_client;
-SET character_set_client = utf8;
-CREATE TABLE `vars` (
-  `id` int(9) NOT NULL auto_increment,
-  `module_name` varchar(64) NOT NULL,
-  `name` varchar(64) NOT NULL,
-  `value` text,
-  PRIMARY KEY  (`id`),
-  UNIQUE KEY `module_name` (`module_name`,`name`)
-) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
-SET character_set_client = @saved_cs_client;
-INSERT INTO `vars` VALUES (1,'core','active_site_theme','default'),(2,'core','active_admin_theme','admin_default'),(3,'core','page_size','9'),(4,'core','thumb_size','200'),(5,'core','resize_size','640'),(6,'core','graphics_toolkit','imagemagick'),(7,'core','graphics_toolkit_path','/usr/bin'),(8,'core','dashboard_blocks','a:2:{s:7:\"sidebar\";a:3:{i:1897057832;a:2:{i:0;s:4:\"core\";i:1;s:5:\"stats\";}i:863091211;a:2:{i:0;s:4:\"core\";i:1;s:13:\"platform_info\";}i:1286303073;a:2:{i:0;s:4:\"core\";i:1;s:12:\"project_news\";}}s:4:\"main\";a:4:{i:1969666309;a:2:{i:0;s:4:\"core\";i:1;s:7:\"welcome\";}i:353682022;a:2:{i:0;s:4:\"core\";i:1;s:12:\"photo_stream\";}i:1636721943;a:2:{i:0;s:4:\"core\";i:1;s:11:\"log_entries\";}i:458629768;a:2:{i:0;s:7:\"comment\";i:1;s:15:\"recent_comments\";}}}'),(9,'core','version','3.0'),(10,'comment','spam_caught','0');
-DROP TABLE IF EXISTS `comments`;
-SET @saved_cs_client     = @@character_set_client;
-SET character_set_client = utf8;
-CREATE TABLE `comments` (
-  `author_id` int(9) default NULL,
-  `created` int(9) NOT NULL,
-  `guest_email` varchar(128) default NULL,
-  `guest_name` varchar(128) default NULL,
-  `guest_url` varchar(255) default NULL,
-  `id` int(9) NOT NULL auto_increment,
-  `item_id` int(9) NOT NULL,
-  `server_http_accept_charset` varchar(64) default NULL,
-  `server_http_accept_encoding` varchar(64) default NULL,
-  `server_http_accept_language` varchar(64) default NULL,
-  `server_http_accept` varchar(128) default NULL,
-  `server_http_connection` varchar(64) default NULL,
-  `server_http_host` varchar(64) default NULL,
-  `server_http_referer` varchar(255) default NULL,
-  `server_http_user_agent` varchar(128) default NULL,
-  `server_query_string` varchar(64) default NULL,
-  `server_remote_addr` varchar(32) default NULL,
-  `server_remote_host` varchar(64) default NULL,
-  `server_remote_port` varchar(16) default NULL,
-  `state` char(15) default 'unpublished',
-  `text` text,
-  `updated` int(9) NOT NULL,
-  PRIMARY KEY  (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-SET character_set_client = @saved_cs_client;
-DROP TABLE IF EXISTS `groups`;
-SET @saved_cs_client     = @@character_set_client;
-SET character_set_client = utf8;
-CREATE TABLE `groups` (
-  `id` int(9) NOT NULL auto_increment,
-  `name` char(64) default NULL,
-  `special` tinyint(1) default '0',
-  PRIMARY KEY  (`id`),
-  UNIQUE KEY `name` (`name`)
-) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-SET character_set_client = @saved_cs_client;
-INSERT INTO `groups` VALUES (1,'Everybody',1),(2,'Registered Users',1);
 DROP TABLE IF EXISTS `users`;
 SET @saved_cs_client     = @@character_set_client;
 SET character_set_client = utf8;
@@ -256,3 +256,16 @@ CREATE TABLE `users` (
 ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
 SET character_set_client = @saved_cs_client;
 INSERT INTO `users` VALUES (1,'guest','Guest User','mP`hf6bf25b90e2765ffe2e65737b142dba5',0,0,NULL,0,1,NULL),(2,'admin','Gallery Administrator','SU]63326748b5026b4d7b5d5c8c83a266743',1,1232172351,NULL,1,0,NULL);
+DROP TABLE IF EXISTS `vars`;
+SET @saved_cs_client     = @@character_set_client;
+SET character_set_client = utf8;
+CREATE TABLE `vars` (
+  `id` int(9) NOT NULL auto_increment,
+  `module_name` varchar(64) NOT NULL,
+  `name` varchar(64) NOT NULL,
+  `value` text,
+  PRIMARY KEY  (`id`),
+  UNIQUE KEY `module_name` (`module_name`,`name`)
+) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
+SET character_set_client = @saved_cs_client;
+INSERT INTO `vars` VALUES (1,'core','active_site_theme','default'),(2,'core','active_admin_theme','admin_default'),(3,'core','page_size','9'),(4,'core','thumb_size','200'),(5,'core','resize_size','640'),(6,'core','graphics_toolkit','imagemagick'),(7,'core','graphics_toolkit_path','/usr/bin'),(8,'core','dashboard_blocks','a:2:{s:7:\"sidebar\";a:3:{i:1897057832;a:2:{i:0;s:4:\"core\";i:1;s:5:\"stats\";}i:863091211;a:2:{i:0;s:4:\"core\";i:1;s:13:\"platform_info\";}i:1286303073;a:2:{i:0;s:4:\"core\";i:1;s:12:\"project_news\";}}s:4:\"main\";a:4:{i:1969666309;a:2:{i:0;s:4:\"core\";i:1;s:7:\"welcome\";}i:353682022;a:2:{i:0;s:4:\"core\";i:1;s:12:\"photo_stream\";}i:1636721943;a:2:{i:0;s:4:\"core\";i:1;s:11:\"log_entries\";}i:458629768;a:2:{i:0;s:7:\"comment\";i:1;s:15:\"recent_comments\";}}}'),(9,'core','version','3.0'),(10,'comment','spam_caught','0');
-- 
cgit v1.2.3

