Changeset 2339 for trunk/install
- Timestamp:
- May 15, 2008, 12:25:36 AM (16 years ago)
- Location:
- trunk/install
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/install/piwigo_structure.sql
r2336 r2339 6 6 7 7 -- 8 -- Table structure for table `p hpwebgallery_caddie`9 -- 10 11 DROP TABLE IF EXISTS `p hpwebgallery_caddie`;12 CREATE TABLE `p hpwebgallery_caddie` (8 -- Table structure for table `piwigo_caddie` 9 -- 10 11 DROP TABLE IF EXISTS `piwigo_caddie`; 12 CREATE TABLE `piwigo_caddie` ( 13 13 `user_id` smallint(5) NOT NULL default '0', 14 14 `element_id` mediumint(8) NOT NULL default '0', … … 17 17 18 18 -- 19 -- Table structure for table `p hpwebgallery_categories`20 -- 21 22 DROP TABLE IF EXISTS `p hpwebgallery_categories`;23 CREATE TABLE `p hpwebgallery_categories` (19 -- Table structure for table `piwigo_categories` 20 -- 21 22 DROP TABLE IF EXISTS `piwigo_categories`; 23 CREATE TABLE `piwigo_categories` ( 24 24 `id` smallint(5) unsigned NOT NULL auto_increment, 25 25 `name` varchar(255) NOT NULL default '', … … 44 44 45 45 -- 46 -- Table structure for table `p hpwebgallery_comments`47 -- 48 49 DROP TABLE IF EXISTS `p hpwebgallery_comments`;50 CREATE TABLE `p hpwebgallery_comments` (46 -- Table structure for table `piwigo_comments` 47 -- 48 49 DROP TABLE IF EXISTS `piwigo_comments`; 50 CREATE TABLE `piwigo_comments` ( 51 51 `id` int(11) unsigned NOT NULL auto_increment, 52 52 `image_id` mediumint(8) unsigned NOT NULL default '0', … … 62 62 63 63 -- 64 -- Table structure for table `p hpwebgallery_config`65 -- 66 67 DROP TABLE IF EXISTS `p hpwebgallery_config`;68 CREATE TABLE `p hpwebgallery_config` (64 -- Table structure for table `piwigo_config` 65 -- 66 67 DROP TABLE IF EXISTS `piwigo_config`; 68 CREATE TABLE `piwigo_config` ( 69 69 `param` varchar(40) NOT NULL default '', 70 70 `value` text, … … 74 74 75 75 -- 76 -- Table structure for table `p hpwebgallery_favorites`77 -- 78 79 DROP TABLE IF EXISTS `p hpwebgallery_favorites`;80 CREATE TABLE `p hpwebgallery_favorites` (76 -- Table structure for table `piwigo_favorites` 77 -- 78 79 DROP TABLE IF EXISTS `piwigo_favorites`; 80 CREATE TABLE `piwigo_favorites` ( 81 81 `user_id` smallint(5) NOT NULL default '0', 82 82 `image_id` mediumint(8) unsigned NOT NULL default '0', … … 85 85 86 86 -- 87 -- Table structure for table `p hpwebgallery_group_access`88 -- 89 90 DROP TABLE IF EXISTS `p hpwebgallery_group_access`;91 CREATE TABLE `p hpwebgallery_group_access` (87 -- Table structure for table `piwigo_group_access` 88 -- 89 90 DROP TABLE IF EXISTS `piwigo_group_access`; 91 CREATE TABLE `piwigo_group_access` ( 92 92 `group_id` smallint(5) unsigned NOT NULL default '0', 93 93 `cat_id` smallint(5) unsigned NOT NULL default '0', … … 96 96 97 97 -- 98 -- Table structure for table `p hpwebgallery_groups`99 -- 100 101 DROP TABLE IF EXISTS `p hpwebgallery_groups`;102 CREATE TABLE `p hpwebgallery_groups` (98 -- Table structure for table `piwigo_groups` 99 -- 100 101 DROP TABLE IF EXISTS `piwigo_groups`; 102 CREATE TABLE `piwigo_groups` ( 103 103 `id` smallint(5) unsigned NOT NULL auto_increment, 104 104 `name` varchar(255) NOT NULL default '', … … 109 109 110 110 -- 111 -- Table structure for table `p hpwebgallery_history`112 -- 113 114 DROP TABLE IF EXISTS `p hpwebgallery_history`;115 CREATE TABLE `p hpwebgallery_history` (111 -- Table structure for table `piwigo_history` 112 -- 113 114 DROP TABLE IF EXISTS `piwigo_history`; 115 CREATE TABLE `piwigo_history` ( 116 116 `id` int(10) unsigned NOT NULL auto_increment, 117 117 `date` date NOT NULL default '0000-00-00', … … 130 130 131 131 -- 132 -- Table structure for table `p hpwebgallery_history_summary`133 -- 134 135 DROP TABLE IF EXISTS `p hpwebgallery_history_summary`;136 CREATE TABLE `p hpwebgallery_history_summary` (132 -- Table structure for table `piwigo_history_summary` 133 -- 134 135 DROP TABLE IF EXISTS `piwigo_history_summary`; 136 CREATE TABLE `piwigo_history_summary` ( 137 137 `year` smallint(4) NOT NULL default '0', 138 138 `month` tinyint(2) default NULL, … … 144 144 145 145 -- 146 -- Table structure for table `p hpwebgallery_image_category`147 -- 148 149 DROP TABLE IF EXISTS `p hpwebgallery_image_category`;150 CREATE TABLE `p hpwebgallery_image_category` (146 -- Table structure for table `piwigo_image_category` 147 -- 148 149 DROP TABLE IF EXISTS `piwigo_image_category`; 150 CREATE TABLE `piwigo_image_category` ( 151 151 `image_id` mediumint(8) unsigned NOT NULL default '0', 152 152 `category_id` smallint(5) unsigned NOT NULL default '0', … … 156 156 157 157 -- 158 -- Table structure for table `p hpwebgallery_image_tag`159 -- 160 161 DROP TABLE IF EXISTS `p hpwebgallery_image_tag`;162 CREATE TABLE `p hpwebgallery_image_tag` (158 -- Table structure for table `piwigo_image_tag` 159 -- 160 161 DROP TABLE IF EXISTS `piwigo_image_tag`; 162 CREATE TABLE `piwigo_image_tag` ( 163 163 `image_id` mediumint(8) unsigned NOT NULL default '0', 164 164 `tag_id` smallint(5) unsigned NOT NULL default '0', … … 168 168 169 169 -- 170 -- Table structure for table `p hpwebgallery_images`171 -- 172 173 DROP TABLE IF EXISTS `p hpwebgallery_images`;174 CREATE TABLE `p hpwebgallery_images` (170 -- Table structure for table `piwigo_images` 171 -- 172 173 DROP TABLE IF EXISTS `piwigo_images`; 174 CREATE TABLE `piwigo_images` ( 175 175 `id` mediumint(8) unsigned NOT NULL auto_increment, 176 176 `file` varchar(255) NOT NULL default '', … … 202 202 203 203 -- 204 -- Table structure for table `p hpwebgallery_old_permalinks`205 -- 206 207 DROP TABLE IF EXISTS `p hpwebgallery_old_permalinks`;208 CREATE TABLE `p hpwebgallery_old_permalinks` (204 -- Table structure for table `piwigo_old_permalinks` 205 -- 206 207 DROP TABLE IF EXISTS `piwigo_old_permalinks`; 208 CREATE TABLE `piwigo_old_permalinks` ( 209 209 `cat_id` smallint(5) unsigned NOT NULL default '0', 210 210 `permalink` varchar(64) NOT NULL default '', … … 216 216 217 217 -- 218 -- Table structure for table `p hpwebgallery_plugins`219 -- 220 221 DROP TABLE IF EXISTS `p hpwebgallery_plugins`;222 CREATE TABLE `p hpwebgallery_plugins` (218 -- Table structure for table `piwigo_plugins` 219 -- 220 221 DROP TABLE IF EXISTS `piwigo_plugins`; 222 CREATE TABLE `piwigo_plugins` ( 223 223 `id` varchar(64) binary NOT NULL default '', 224 224 `state` enum('inactive','active') NOT NULL default 'inactive', … … 228 228 229 229 -- 230 -- Table structure for table `p hpwebgallery_rate`231 -- 232 233 DROP TABLE IF EXISTS `p hpwebgallery_rate`;234 CREATE TABLE `p hpwebgallery_rate` (230 -- Table structure for table `piwigo_rate` 231 -- 232 233 DROP TABLE IF EXISTS `piwigo_rate`; 234 CREATE TABLE `piwigo_rate` ( 235 235 `user_id` smallint(5) NOT NULL default '0', 236 236 `element_id` mediumint(8) unsigned NOT NULL default '0', … … 242 242 243 243 -- 244 -- Table structure for table `p hpwebgallery_search`245 -- 246 247 DROP TABLE IF EXISTS `p hpwebgallery_search`;248 CREATE TABLE `p hpwebgallery_search` (244 -- Table structure for table `piwigo_search` 245 -- 246 247 DROP TABLE IF EXISTS `piwigo_search`; 248 CREATE TABLE `piwigo_search` ( 249 249 `id` int(10) unsigned NOT NULL auto_increment, 250 250 `last_seen` date default NULL, … … 254 254 255 255 -- 256 -- Table structure for table `p hpwebgallery_sessions`257 -- 258 259 DROP TABLE IF EXISTS `p hpwebgallery_sessions`;260 CREATE TABLE `p hpwebgallery_sessions` (256 -- Table structure for table `piwigo_sessions` 257 -- 258 259 DROP TABLE IF EXISTS `piwigo_sessions`; 260 CREATE TABLE `piwigo_sessions` ( 261 261 `id` varchar(255) binary NOT NULL default '', 262 262 `data` mediumtext NOT NULL, … … 266 266 267 267 -- 268 -- Table structure for table `p hpwebgallery_sites`269 -- 270 271 DROP TABLE IF EXISTS `p hpwebgallery_sites`;272 CREATE TABLE `p hpwebgallery_sites` (268 -- Table structure for table `piwigo_sites` 269 -- 270 271 DROP TABLE IF EXISTS `piwigo_sites`; 272 CREATE TABLE `piwigo_sites` ( 273 273 `id` tinyint(4) NOT NULL auto_increment, 274 274 `galleries_url` varchar(255) NOT NULL default '', … … 278 278 279 279 -- 280 -- Table structure for table `p hpwebgallery_tags`281 -- 282 283 DROP TABLE IF EXISTS `p hpwebgallery_tags`;284 CREATE TABLE `p hpwebgallery_tags` (280 -- Table structure for table `piwigo_tags` 281 -- 282 283 DROP TABLE IF EXISTS `piwigo_tags`; 284 CREATE TABLE `piwigo_tags` ( 285 285 `id` smallint(5) unsigned NOT NULL auto_increment, 286 286 `name` varchar(255) binary NOT NULL default '', … … 291 291 292 292 -- 293 -- Table structure for table `p hpwebgallery_upgrade`294 -- 295 296 DROP TABLE IF EXISTS `p hpwebgallery_upgrade`;297 CREATE TABLE `p hpwebgallery_upgrade` (293 -- Table structure for table `piwigo_upgrade` 294 -- 295 296 DROP TABLE IF EXISTS `piwigo_upgrade`; 297 CREATE TABLE `piwigo_upgrade` ( 298 298 `id` varchar(20) NOT NULL default '', 299 299 `applied` datetime NOT NULL default '0000-00-00 00:00:00', … … 303 303 304 304 -- 305 -- Table structure for table `p hpwebgallery_user_access`306 -- 307 308 DROP TABLE IF EXISTS `p hpwebgallery_user_access`;309 CREATE TABLE `p hpwebgallery_user_access` (305 -- Table structure for table `piwigo_user_access` 306 -- 307 308 DROP TABLE IF EXISTS `piwigo_user_access`; 309 CREATE TABLE `piwigo_user_access` ( 310 310 `user_id` smallint(5) NOT NULL default '0', 311 311 `cat_id` smallint(5) unsigned NOT NULL default '0', … … 314 314 315 315 -- 316 -- Table structure for table `p hpwebgallery_user_cache`317 -- 318 319 DROP TABLE IF EXISTS `p hpwebgallery_user_cache`;320 CREATE TABLE `p hpwebgallery_user_cache` (316 -- Table structure for table `piwigo_user_cache` 317 -- 318 319 DROP TABLE IF EXISTS `piwigo_user_cache`; 320 CREATE TABLE `piwigo_user_cache` ( 321 321 `user_id` smallint(5) NOT NULL default '0', 322 322 `need_update` enum('true','false') NOT NULL default 'true', … … 329 329 330 330 -- 331 -- Table structure for table `p hpwebgallery_user_cache_categories`332 -- 333 334 DROP TABLE IF EXISTS `p hpwebgallery_user_cache_categories`;335 CREATE TABLE `p hpwebgallery_user_cache_categories` (331 -- Table structure for table `piwigo_user_cache_categories` 332 -- 333 334 DROP TABLE IF EXISTS `piwigo_user_cache_categories`; 335 CREATE TABLE `piwigo_user_cache_categories` ( 336 336 `user_id` smallint(5) NOT NULL default '0', 337 337 `cat_id` smallint(5) unsigned NOT NULL default '0', … … 345 345 346 346 -- 347 -- Table structure for table `p hpwebgallery_user_feed`348 -- 349 350 DROP TABLE IF EXISTS `p hpwebgallery_user_feed`;351 CREATE TABLE `p hpwebgallery_user_feed` (347 -- Table structure for table `piwigo_user_feed` 348 -- 349 350 DROP TABLE IF EXISTS `piwigo_user_feed`; 351 CREATE TABLE `piwigo_user_feed` ( 352 352 `id` varchar(50) binary NOT NULL default '', 353 353 `user_id` smallint(5) NOT NULL default '0', … … 357 357 358 358 -- 359 -- Table structure for table `p hpwebgallery_user_group`360 -- 361 362 DROP TABLE IF EXISTS `p hpwebgallery_user_group`;363 CREATE TABLE `p hpwebgallery_user_group` (359 -- Table structure for table `piwigo_user_group` 360 -- 361 362 DROP TABLE IF EXISTS `piwigo_user_group`; 363 CREATE TABLE `piwigo_user_group` ( 364 364 `user_id` smallint(5) NOT NULL default '0', 365 365 `group_id` smallint(5) unsigned NOT NULL default '0', … … 368 368 369 369 -- 370 -- Table structure for table `p hpwebgallery_user_infos`371 -- 372 373 DROP TABLE IF EXISTS `p hpwebgallery_user_infos`;374 CREATE TABLE `p hpwebgallery_user_infos` (370 -- Table structure for table `piwigo_user_infos` 371 -- 372 373 DROP TABLE IF EXISTS `piwigo_user_infos`; 374 CREATE TABLE `piwigo_user_infos` ( 375 375 `user_id` smallint(5) NOT NULL default '0', 376 376 `nb_image_line` tinyint(1) unsigned NOT NULL default '5', … … 393 393 394 394 -- 395 -- Table structure for table `p hpwebgallery_user_mail_notification`396 -- 397 398 DROP TABLE IF EXISTS `p hpwebgallery_user_mail_notification`;399 CREATE TABLE `p hpwebgallery_user_mail_notification` (395 -- Table structure for table `piwigo_user_mail_notification` 396 -- 397 398 DROP TABLE IF EXISTS `piwigo_user_mail_notification`; 399 CREATE TABLE `piwigo_user_mail_notification` ( 400 400 `user_id` smallint(5) NOT NULL default '0', 401 401 `check_key` varchar(16) binary NOT NULL default '', … … 407 407 408 408 -- 409 -- Table structure for table `p hpwebgallery_users`410 -- 411 412 DROP TABLE IF EXISTS `p hpwebgallery_users`;413 CREATE TABLE `p hpwebgallery_users` (409 -- Table structure for table `piwigo_users` 410 -- 411 412 DROP TABLE IF EXISTS `piwigo_users`; 413 CREATE TABLE `piwigo_users` ( 414 414 `id` smallint(5) NOT NULL auto_increment, 415 415 `username` varchar(100) binary NOT NULL default '', … … 421 421 422 422 -- 423 -- Table structure for table `p hpwebgallery_waiting`424 -- 425 426 DROP TABLE IF EXISTS `p hpwebgallery_waiting`;427 CREATE TABLE `p hpwebgallery_waiting` (423 -- Table structure for table `piwigo_waiting` 424 -- 425 426 DROP TABLE IF EXISTS `piwigo_waiting`; 427 CREATE TABLE `piwigo_waiting` ( 428 428 `id` int(10) unsigned NOT NULL auto_increment, 429 429 `storage_category_id` smallint(5) unsigned NOT NULL default '0', … … 439 439 440 440 -- 441 -- Table structure for table `p hpwebgallery_ws_access`442 -- 443 444 DROP TABLE IF EXISTS `p hpwebgallery_ws_access`;445 CREATE TABLE `p hpwebgallery_ws_access` (441 -- Table structure for table `piwigo_ws_access` 442 -- 443 444 DROP TABLE IF EXISTS `piwigo_ws_access`; 445 CREATE TABLE `piwigo_ws_access` ( 446 446 `id` smallint(5) unsigned NOT NULL auto_increment, 447 447 `name` varchar(32) NOT NULL default '', -
trunk/install/upgrade_1.4.0.php
r2299 r2339 70 70 71 71 " 72 ALTER TABLE p hpwebgallery_categories72 ALTER TABLE piwigo_categories 73 73 CHANGE COLUMN date_last date_last datetime default NULL 74 74 ;", 75 75 76 76 " 77 ALTER TABLE p hpwebgallery_comments77 ALTER TABLE piwigo_comments 78 78 ADD COLUMN validation_date datetime default NULL 79 79 ;", 80 80 81 81 " 82 UPDATE p hpwebgallery_comments82 UPDATE piwigo_comments 83 83 SET validation_date = date 84 84 ", 85 85 86 86 " 87 ALTER TABLE p hpwebgallery_comments87 ALTER TABLE piwigo_comments 88 88 ADD INDEX comments_i1 (image_id) 89 89 ;", 90 90 91 91 " 92 ALTER TABLE p hpwebgallery_comments92 ALTER TABLE piwigo_comments 93 93 ADD INDEX comments_i2 (validation_date) 94 94 ;", 95 95 96 96 " 97 ALTER TABLE p hpwebgallery_favorites98 CHANGE COLUMN user_id user_id smallint(5) NOT NULL default '0' 99 ;", 100 101 " 102 ALTER TABLE p hpwebgallery_images97 ALTER TABLE piwigo_favorites 98 CHANGE COLUMN user_id user_id smallint(5) NOT NULL default '0' 99 ;", 100 101 " 102 ALTER TABLE piwigo_images 103 103 CHANGE COLUMN date_available 104 104 date_available datetime NOT NULL default '0000-00-00 00:00:00' … … 106 106 107 107 " 108 ALTER TABLE p hpwebgallery_rate109 CHANGE COLUMN user_id user_id smallint(5) NOT NULL default '0' 110 ;", 111 112 " 113 ALTER TABLE p hpwebgallery_sessions114 CHANGE COLUMN user_id user_id smallint(5) NOT NULL default '0' 115 ;", 116 117 " 118 ALTER TABLE p hpwebgallery_user_access119 CHANGE COLUMN user_id user_id smallint(5) NOT NULL default '0' 120 ;", 121 122 " 123 DROP TABLE p hpwebgallery_user_forbidden124 ;", 125 126 " 127 ALTER TABLE p hpwebgallery_user_group108 ALTER TABLE piwigo_rate 109 CHANGE COLUMN user_id user_id smallint(5) NOT NULL default '0' 110 ;", 111 112 " 113 ALTER TABLE piwigo_sessions 114 CHANGE COLUMN user_id user_id smallint(5) NOT NULL default '0' 115 ;", 116 117 " 118 ALTER TABLE piwigo_user_access 119 CHANGE COLUMN user_id user_id smallint(5) NOT NULL default '0' 120 ;", 121 122 " 123 DROP TABLE piwigo_user_forbidden 124 ;", 125 126 " 127 ALTER TABLE piwigo_user_group 128 128 CHANGE COLUMN user_id user_id smallint(5) NOT NULL default '0' 129 129 ;", 130 130 131 131 " 132 ALTER TABLE p hpwebgallery_users132 ALTER TABLE piwigo_users 133 133 CHANGE COLUMN id id smallint(5) NOT NULL auto_increment 134 134 ;", 135 135 136 136 " 137 CREATE TABLE p hpwebgallery_caddie (137 CREATE TABLE piwigo_caddie ( 138 138 user_id smallint(5) NOT NULL default '0', 139 139 element_id mediumint(8) NOT NULL default '0', … … 143 143 144 144 " 145 CREATE TABLE p hpwebgallery_user_cache (145 CREATE TABLE piwigo_user_cache ( 146 146 user_id smallint(5) NOT NULL default '0', 147 147 need_update enum('true','false') NOT NULL default 'true', … … 152 152 153 153 " 154 CREATE TABLE p hpwebgallery_user_feed (154 CREATE TABLE piwigo_user_feed ( 155 155 id varchar(50) binary NOT NULL default '', 156 156 user_id smallint(5) NOT NULL default '0', … … 161 161 162 162 " 163 CREATE TABLE p hpwebgallery_user_infos (163 CREATE TABLE piwigo_user_infos ( 164 164 user_id smallint(5) NOT NULL default '0', 165 165 nb_image_line tinyint(1) unsigned NOT NULL default '5', … … 181 181 foreach ($queries as $query) 182 182 { 183 $query = str_replace('p hpwebgallery_', PREFIX_TABLE, $query);183 $query = str_replace('piwigo_', PREFIX_TABLE, $query); 184 184 pwg_query($query); 185 185 } 186 186 187 // user datas migration from p hpwebgallery_users to phpwebgallery_user_infos187 // user datas migration from piwigo_users to piwigo_user_infos 188 188 $query = ' 189 189 SELECT * … … 254 254 ( 255 255 'gallery_title', 256 'P hpWebGallerydemonstration site',256 'Piwigo demonstration site', 257 257 'Title at top of each page and for RSS feed' 258 258 ) … … 274 274 foreach ($queries as $query) 275 275 { 276 $query = str_replace('p hpwebgallery_', PREFIX_TABLE, $query);276 $query = str_replace('piwigo_', PREFIX_TABLE, $query); 277 277 pwg_query($query); 278 278 }
Note: See TracChangeset
for help on using the changeset viewer.