Skip to content

Commit

Permalink
bug 2155 fixed: for MySQL, use the "ENGINE=MyISAM" syntax instead of the
Browse files Browse the repository at this point in the history
deprecated "TYPE=MyISAM", so that SQL creation table statements complies
with MySQL 5.5


git-svn-id: http://piwigo.org/svn/trunk@9086 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed Feb 3, 2011
1 parent a201d10 commit 8ca4d94
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 47 deletions.
4 changes: 2 additions & 2 deletions install/db/85-database.php
Expand Up @@ -34,7 +34,7 @@
`version` varchar(64) NOT NULL default '0',
`name` varchar(64) default NULL,
PRIMARY KEY (`id`)
)";
) ENGINE=MyISAM";

if (DB_CHARSET == 'utf8')
{
Expand All @@ -48,4 +48,4 @@
. $upgrade_description
."\n"
;
?>
?>
4 changes: 2 additions & 2 deletions install/db/90-database.php
Expand Up @@ -34,7 +34,7 @@
`version` varchar(64) NOT NULL default '0',
`name` varchar(64) default NULL,
PRIMARY KEY (`id`)
)";
) ENGINE=MyISAM";

if (DB_CHARSET == 'utf8')
{
Expand All @@ -59,4 +59,4 @@
. $upgrade_description
."\n"
;
?>
?>
60 changes: 30 additions & 30 deletions install/piwigo_structure-mysql.sql
Expand Up @@ -13,7 +13,7 @@ CREATE TABLE `piwigo_caddie` (
`user_id` smallint(5) NOT NULL default '0',
`element_id` mediumint(8) NOT NULL default '0',
PRIMARY KEY (`user_id`,`element_id`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_categories`
Expand All @@ -39,7 +39,7 @@ CREATE TABLE `piwigo_categories` (
PRIMARY KEY (`id`),
UNIQUE KEY `categories_i3` (`permalink`),
KEY `categories_i2` (`id_uppercat`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_comments`
Expand All @@ -58,7 +58,7 @@ CREATE TABLE `piwigo_comments` (
PRIMARY KEY (`id`),
KEY `comments_i2` (`validation_date`),
KEY `comments_i1` (`image_id`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_config`
Expand All @@ -70,7 +70,7 @@ CREATE TABLE `piwigo_config` (
`value` text,
`comment` varchar(255) default NULL,
PRIMARY KEY (`param`)
) TYPE=MyISAM COMMENT='configuration table';
) ENGINE=MyISAM COMMENT='configuration table';

--
-- Table structure for table `piwigo_favorites`
Expand All @@ -81,7 +81,7 @@ CREATE TABLE `piwigo_favorites` (
`user_id` smallint(5) NOT NULL default '0',
`image_id` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (`user_id`,`image_id`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_group_access`
Expand All @@ -92,7 +92,7 @@ CREATE TABLE `piwigo_group_access` (
`group_id` smallint(5) unsigned NOT NULL default '0',
`cat_id` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`group_id`,`cat_id`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_groups`
Expand All @@ -105,7 +105,7 @@ CREATE TABLE `piwigo_groups` (
`is_default` enum('true','false') NOT NULL default 'false',
PRIMARY KEY (`id`),
UNIQUE KEY `groups_ui1` (`name`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_history`
Expand All @@ -126,7 +126,7 @@ CREATE TABLE `piwigo_history` (
`image_type` enum('picture','high','other') default NULL,
PRIMARY KEY (`id`),
KEY `history_i1` (`summarized`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_history_summary`
Expand All @@ -140,7 +140,7 @@ CREATE TABLE `piwigo_history_summary` (
`hour` tinyint(2) default NULL,
`nb_pages` int(11) default NULL,
UNIQUE KEY history_summary_ymdh (`year`,`month`,`day`,`hour`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_image_category`
Expand All @@ -153,7 +153,7 @@ CREATE TABLE `piwigo_image_category` (
`rank` mediumint(8) unsigned default NULL,
PRIMARY KEY (`image_id`,`category_id`),
KEY `image_category_i1` (`category_id`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_image_tag`
Expand All @@ -165,7 +165,7 @@ CREATE TABLE `piwigo_image_tag` (
`tag_id` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`image_id`,`tag_id`),
KEY `image_tag_i1` (`tag_id`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_images`
Expand Down Expand Up @@ -201,7 +201,7 @@ CREATE TABLE `piwigo_images` (
KEY `images_i4` (`hit`),
KEY `images_i5` (`date_creation`),
KEY `images_i1` (`storage_category_id`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_languages`
Expand All @@ -213,7 +213,7 @@ CREATE TABLE `piwigo_languages` (
`version` varchar(64) NOT NULL default '0',
`name` varchar(64) default NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_old_permalinks`
Expand All @@ -227,7 +227,7 @@ CREATE TABLE `piwigo_old_permalinks` (
`last_hit` datetime default NULL,
`hit` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`permalink`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_plugins`
Expand All @@ -239,7 +239,7 @@ CREATE TABLE `piwigo_plugins` (
`state` enum('inactive','active') NOT NULL default 'inactive',
`version` varchar(64) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_rate`
Expand All @@ -253,7 +253,7 @@ CREATE TABLE `piwigo_rate` (
`rate` tinyint(2) unsigned NOT NULL default '0',
`date` date NOT NULL default '0000-00-00',
PRIMARY KEY (`element_id`,`user_id`,`anonymous_id`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_search`
Expand All @@ -265,7 +265,7 @@ CREATE TABLE `piwigo_search` (
`last_seen` date default NULL,
`rules` text,
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_sessions`
Expand All @@ -277,7 +277,7 @@ CREATE TABLE `piwigo_sessions` (
`data` mediumtext NOT NULL,
`expiration` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_sites`
Expand All @@ -289,7 +289,7 @@ CREATE TABLE `piwigo_sites` (
`galleries_url` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE KEY `sites_ui1` (`galleries_url`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_tags`
Expand All @@ -302,7 +302,7 @@ CREATE TABLE `piwigo_tags` (
`url_name` varchar(255) binary NOT NULL default '',
PRIMARY KEY (`id`),
KEY `tags_i1` (`url_name`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_themes`
Expand All @@ -314,7 +314,7 @@ CREATE TABLE `piwigo_themes` (
`version` varchar(64) NOT NULL default '0',
`name` varchar(64) default NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_upgrade`
Expand All @@ -326,7 +326,7 @@ CREATE TABLE `piwigo_upgrade` (
`applied` datetime NOT NULL default '0000-00-00 00:00:00',
`description` varchar(255) default NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_user_access`
Expand All @@ -337,7 +337,7 @@ CREATE TABLE `piwigo_user_access` (
`user_id` smallint(5) NOT NULL default '0',
`cat_id` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`user_id`,`cat_id`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_user_cache`
Expand All @@ -353,7 +353,7 @@ CREATE TABLE `piwigo_user_cache` (
`image_access_type` enum('NOT IN','IN') NOT NULL default 'NOT IN',
`image_access_list` mediumtext default NULL,
PRIMARY KEY (`user_id`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_user_cache_categories`
Expand All @@ -370,7 +370,7 @@ CREATE TABLE `piwigo_user_cache_categories` (
`count_categories` mediumint(8) unsigned default '0',
`user_representative_picture_id` mediumint(8) unsigned default NULL,
PRIMARY KEY (`user_id`,`cat_id`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_user_feed`
Expand All @@ -382,7 +382,7 @@ CREATE TABLE `piwigo_user_feed` (
`user_id` smallint(5) NOT NULL default '0',
`last_check` datetime default NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_user_group`
Expand All @@ -393,7 +393,7 @@ CREATE TABLE `piwigo_user_group` (
`user_id` smallint(5) NOT NULL default '0',
`group_id` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`group_id`,`user_id`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_user_infos`
Expand All @@ -417,7 +417,7 @@ CREATE TABLE `piwigo_user_infos` (
`enabled_high` enum('true','false') NOT NULL default 'true',
`level` tinyint unsigned NOT NULL default '0',
UNIQUE KEY `user_infos_ui1` (`user_id`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_user_mail_notification`
Expand All @@ -431,7 +431,7 @@ CREATE TABLE `piwigo_user_mail_notification` (
`last_send` datetime default NULL,
PRIMARY KEY (`user_id`),
UNIQUE KEY `user_mail_notification_ui1` (`check_key`)
) TYPE=MyISAM;
) ENGINE=MyISAM;

--
-- Table structure for table `piwigo_users`
Expand All @@ -445,4 +445,4 @@ CREATE TABLE `piwigo_users` (
`mail_address` varchar(255) default NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `users_ui1` (`username`)
) TYPE=MyISAM;
) ENGINE=MyISAM;
6 changes: 3 additions & 3 deletions install/upgrade_1.3.1.php
Expand Up @@ -55,7 +55,7 @@
value varchar(255) default NULL,
comment varchar(255) default NULL,
PRIMARY KEY (param)
) TYPE=MyISAM COMMENT='configuration table'
) ENGINE=MyISAM COMMENT='configuration table'
;",

"
Expand Down Expand Up @@ -279,7 +279,7 @@
element_id mediumint(8) unsigned NOT NULL default '0',
rate tinyint(2) unsigned NOT NULL default '0',
PRIMARY KEY (user_id,element_id)
) TYPE=MyISAM
) ENGINE=MyISAM
;",

"
Expand All @@ -288,7 +288,7 @@
need_update enum('true','false') NOT NULL default 'true',
forbidden_categories text,
PRIMARY KEY (user_id)
) TYPE=MyISAM
) ENGINE=MyISAM
;",

"
Expand Down
8 changes: 4 additions & 4 deletions install/upgrade_1.4.0.php
Expand Up @@ -138,7 +138,7 @@
user_id smallint(5) NOT NULL default '0',
element_id mediumint(8) NOT NULL default '0',
PRIMARY KEY (user_id,element_id)
) TYPE=MyISAM
) ENGINE=MyISAM
;",

"
Expand All @@ -147,7 +147,7 @@
need_update enum('true','false') NOT NULL default 'true',
forbidden_categories text,
PRIMARY KEY (user_id)
) TYPE=MyISAM
) ENGINE=MyISAM
;",

"
Expand All @@ -156,7 +156,7 @@
user_id smallint(5) NOT NULL default '0',
last_check datetime default NULL,
PRIMARY KEY (id)
) TYPE=MyISAM
) ENGINE=MyISAM
;",

"
Expand All @@ -174,7 +174,7 @@
template varchar(255) NOT NULL default 'yoga',
registration_date datetime NOT NULL default '0000-00-00 00:00:00',
UNIQUE KEY user_infos_ui1 (user_id)
) TYPE=MyISAM
) ENGINE=MyISAM
;"
);

Expand Down

0 comments on commit 8ca4d94

Please sign in to comment.