Revision 309
Added by stefan almost 19 years ago
save.php | ||
---|---|---|
363 | 363 |
. ' `parent` INT NOT NULL ,' |
364 | 364 |
. ' `root_parent` INT NOT NULL ,' |
365 | 365 |
. ' `level` INT NOT NULL ,' |
366 |
. ' `link` TEXT NOT NULL ,' |
|
367 |
. ' `target` VARCHAR( 7 ) NOT NULL ,' |
|
368 |
. ' `page_title` VARCHAR( 255 ) NOT NULL ,' |
|
369 |
. ' `menu_title` VARCHAR( 255 ) NOT NULL ,' |
|
370 |
. ' `description` TEXT NOT NULL ,' |
|
371 |
. ' `keywords` TEXT NOT NULL ,' |
|
372 |
. ' `page_trail` TEXT NOT NULL ,' |
|
373 |
. ' `template` VARCHAR( 255 ) NOT NULL ,' |
|
374 |
. ' `visibility` VARCHAR( 255 ) NOT NULL ,' |
|
366 |
. ' `link` TEXT NOT NULL DEFAULT \'\' ,'
|
|
367 |
. ' `target` VARCHAR( 7 ) NOT NULL DEFAULT \'\' ,'
|
|
368 |
. ' `page_title` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
369 |
. ' `menu_title` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
370 |
. ' `description` TEXT NOT NULL DEFAULT \'\' ,'
|
|
371 |
. ' `keywords` TEXT NOT NULL DEFAULT \'\' ,'
|
|
372 |
. ' `page_trail` TEXT NOT NULL DEFAULT \'\' ,'
|
|
373 |
. ' `template` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
374 |
. ' `visibility` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
375 | 375 |
. ' `position` INT NOT NULL ,' |
376 | 376 |
. ' `menu` INT NOT NULL ,' |
377 |
. ' `language` VARCHAR( 5 ) NOT NULL ,' |
|
377 |
. ' `language` VARCHAR( 5 ) NOT NULL DEFAULT \'\' ,'
|
|
378 | 378 |
. ' `searching` INT NOT NULL ,' |
379 |
. ' `admin_groups` TEXT NOT NULL ,' |
|
380 |
. ' `admin_users` TEXT NOT NULL ,' |
|
381 |
. ' `viewing_groups` TEXT NOT NULL ,' |
|
382 |
. ' `viewing_users` TEXT NOT NULL ,' |
|
379 |
. ' `admin_groups` TEXT NOT NULL DEFAULT \'\' ,'
|
|
380 |
. ' `admin_users` TEXT NOT NULL DEFAULT \'\' ,'
|
|
381 |
. ' `viewing_groups` TEXT NOT NULL DEFAULT \'\' ,'
|
|
382 |
. ' `viewing_users` TEXT NOT NULL DEFAULT \'\' ,'
|
|
383 | 383 |
. ' `modified_when` INT NOT NULL ,' |
384 | 384 |
. ' `modified_by` INT NOT NULL ,' |
385 | 385 |
. ' PRIMARY KEY ( `page_id` ) )' |
... | ... | |
390 | 390 |
$pages = 'CREATE TABLE `'.TABLE_PREFIX.'sections` ( `section_id` INT NOT NULL auto_increment,' |
391 | 391 |
. ' `page_id` INT NOT NULL ,' |
392 | 392 |
. ' `position` INT NOT NULL ,' |
393 |
. ' `module` VARCHAR( 255 ) NOT NULL ,' |
|
394 |
. ' `block` VARCHAR( 255 ) NOT NULL ,' |
|
393 |
. ' `module` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
394 |
. ' `block` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
395 | 395 |
. ' PRIMARY KEY ( `section_id` ) )' |
396 | 396 |
. ' '; |
397 | 397 |
$database->query($pages); |
... | ... | |
400 | 400 |
|
401 | 401 |
// Settings table |
402 | 402 |
$settings="CREATE TABLE `".TABLE_PREFIX."settings` ( `setting_id` INT NOT NULL auto_increment, |
403 |
`name` VARCHAR( 255 ) NOT NULL , |
|
404 |
`value` TEXT NOT NULL , |
|
403 |
`name` VARCHAR( 255 ) NOT NULL DEFAULT '' ,
|
|
404 |
`value` TEXT NOT NULL DEFAULT '' ,
|
|
405 | 405 |
PRIMARY KEY ( `setting_id` ) )"; |
406 | 406 |
$database->query($settings); |
407 |
|
|
407 | 408 |
$settings_rows= "INSERT INTO `".TABLE_PREFIX."settings` VALUES " |
408 | 409 |
." ('', 'wb_version', '".VERSION."')," |
409 | 410 |
." ('', 'website_title', '$website_title')," |
... | ... | |
451 | 452 |
$users = 'CREATE TABLE `'.TABLE_PREFIX.'users` ( `user_id` INT NOT NULL auto_increment,' |
452 | 453 |
. ' `group_id` INT NOT NULL ,' |
453 | 454 |
. ' `active` INT NOT NULL ,' |
454 |
. ' `username` VARCHAR( 255 ) NOT NULL ,' |
|
455 |
. ' `password` VARCHAR( 255 ) NOT NULL ,' |
|
456 |
. ' `remember_key` VARCHAR( 255 ) NOT NULL ,' |
|
455 |
. ' `username` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
456 |
. ' `password` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
457 |
. ' `remember_key` VARCHAR( 255 ) NOT NULL DEFAULT \'\','
|
|
457 | 458 |
. ' `last_reset` INT NOT NULL ,' |
458 |
. ' `display_name` VARCHAR( 255 ) NOT NULL ,' |
|
459 |
. ' `email` TEXT NOT NULL ,' |
|
459 |
. ' `display_name` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
460 |
. ' `email` TEXT NOT NULL DEFAULT \'\' ,'
|
|
460 | 461 |
. ' `timezone` INT NOT NULL ,' |
461 |
. ' `date_format` VARCHAR( 255 ) NOT NULL ,' |
|
462 |
. ' `time_format` VARCHAR( 255 ) NOT NULL ,' |
|
463 |
. ' `language` VARCHAR( 5 ) NOT NULL ,' |
|
464 |
. ' `home_folder` TEXT NOT NULL ,' |
|
462 |
. ' `date_format` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
463 |
. ' `time_format` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
464 |
. ' `language` VARCHAR( 5 ) NOT NULL DEFAULT \'\' ,'
|
|
465 |
. ' `home_folder` TEXT NOT NULL DEFAULT \'\' ,'
|
|
465 | 466 |
. ' `login_when` INT NOT NULL ,' |
466 |
. ' `login_ip` VARCHAR( 15 ) NOT NULL ,' |
|
467 |
. ' `login_ip` VARCHAR( 15 ) NOT NULL DEFAULT \'\' ,'
|
|
467 | 468 |
. ' PRIMARY KEY ( `user_id` ) )' |
468 | 469 |
. ' '; |
469 | 470 |
$database->query($users); |
470 | 471 |
|
471 | 472 |
// Groups table |
472 | 473 |
$groups = 'CREATE TABLE `'.TABLE_PREFIX.'groups` ( `group_id` INT NOT NULL auto_increment,' |
473 |
. ' `name` VARCHAR( 255 ) NOT NULL ,' |
|
474 |
. ' `system_permissions` TEXT NOT NULL ,' |
|
475 |
. ' `module_permissions` TEXT NOT NULL ,' |
|
476 |
. ' `template_permissions` TEXT NOT NULL ,' |
|
474 |
. ' `name` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
475 |
. ' `system_permissions` TEXT NOT NULL DEFAULT \'\' ,'
|
|
476 |
. ' `module_permissions` TEXT NOT NULL DEFAULT \'\' ,'
|
|
477 |
. ' `template_permissions` TEXT NOT NULL DEFAULT \'\' ,'
|
|
477 | 478 |
. ' PRIMARY KEY ( `group_id` ) )' |
478 | 479 |
. ' '; |
479 | 480 |
$database->query($groups); |
480 | 481 |
|
481 | 482 |
// Search settings table |
482 | 483 |
$search = 'CREATE TABLE `'.TABLE_PREFIX.'search` ( `search_id` INT NOT NULL auto_increment,' |
483 |
. ' `name` VARCHAR( 255 ) NOT NULL ,' |
|
484 |
. ' `value` TEXT NOT NULL ,' |
|
485 |
. ' `extra` TEXT NOT NULL ,' |
|
484 |
. ' `name` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
485 |
. ' `value` TEXT NOT NULL DEFAULT \'\' ,'
|
|
486 |
. ' `extra` TEXT NOT NULL DEFAULT \'\' ,'
|
|
486 | 487 |
. ' PRIMARY KEY ( `search_id` ) )' |
487 | 488 |
. ' '; |
488 | 489 |
$database->query($search); |
... | ... | |
490 | 491 |
// Addons table |
491 | 492 |
$addons = 'CREATE TABLE `'.TABLE_PREFIX.'addons` ( ' |
492 | 493 |
.'`addon_id` INT NOT NULL auto_increment ,' |
493 |
.'`type` VARCHAR( 255 ) NOT NULL ,' |
|
494 |
.'`directory` VARCHAR( 255 ) NOT NULL ,' |
|
495 |
.'`name` VARCHAR( 255 ) NOT NULL ,' |
|
496 |
.'`description` TEXT NOT NULL ,' |
|
497 |
.'`function` VARCHAR( 255 ) NOT NULL ,' |
|
498 |
.'`version` VARCHAR( 255 ) NOT NULL ,' |
|
499 |
.'`platform` VARCHAR( 255 ) NOT NULL ,' |
|
500 |
.'`author` VARCHAR( 255 ) NOT NULL ,' |
|
501 |
.'`license` VARCHAR( 255 ) NOT NULL ,' |
|
494 |
.'`type` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
495 |
.'`directory` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
496 |
.'`name` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
497 |
.'`description` TEXT NOT NULL DEFAULT \'\' ,'
|
|
498 |
.'`function` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
499 |
.'`version` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
500 |
.'`platform` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
501 |
.'`author` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
502 |
.'`license` VARCHAR( 255 ) NOT NULL DEFAULT \'\' ,'
|
|
502 | 503 |
.' PRIMARY KEY ( `addon_id` ) ) '; |
503 | 504 |
$database->query($addons); |
504 | 505 |
|
... | ... | |
651 | 652 |
'GROUPS_TABLE' => TABLE_PREFIX."groups", |
652 | 653 |
) |
653 | 654 |
); |
654 |
?> |
|
655 |
?> |
Also available in: Unified diff
Added default value '' to all varchar and text fields