Mercurial > defr > drupal > core
comparison modules/system/system.install @ 19:3edae6ecd6c6 6.9
Drupal 6.9
author | Franck Deroche <franck@defr.org> |
---|---|
date | Thu, 15 Jan 2009 10:15:56 +0100 |
parents | 589fb7c02327 |
children |
comparison
equal
deleted
inserted
replaced
18:f5131a9cd9e5 | 19:3edae6ecd6c6 |
---|---|
1 <?php | 1 <?php |
2 // $Id: system.install,v 1.238.2.5 2008/09/17 05:33:36 goba Exp $ | 2 // $Id: system.install,v 1.238.2.8 2009/01/14 21:36:16 goba Exp $ |
3 | 3 |
4 /** | 4 /** |
5 * Test and report Drupal installation requirements. | 5 * Test and report Drupal installation requirements. |
6 * | 6 * |
7 * @param $phase | 7 * @param $phase |
266 | 266 |
267 // Test Unicode library | 267 // Test Unicode library |
268 include_once './includes/unicode.inc'; | 268 include_once './includes/unicode.inc'; |
269 $requirements = array_merge($requirements, unicode_requirements()); | 269 $requirements = array_merge($requirements, unicode_requirements()); |
270 | 270 |
271 // Check for update status module. | |
272 if ($phase == 'runtime') { | 271 if ($phase == 'runtime') { |
272 // Check for update status module. | |
273 if (!module_exists('update')) { | 273 if (!module_exists('update')) { |
274 $requirements['update status'] = array( | 274 $requirements['update status'] = array( |
275 'value' => $t('Not enabled'), | 275 'value' => $t('Not enabled'), |
276 'severity' => REQUIREMENT_WARNING, | 276 'severity' => REQUIREMENT_WARNING, |
277 'description' => $t('Update notifications are not enabled. It is <strong>highly recommended</strong> that you enable the update status module from the <a href="@module">module administration page</a> in order to stay up-to-date on new releases. For more information please read the <a href="@update">Update status handbook page</a>.', array('@update' => 'http://drupal.org/handbook/modules/update', '@module' => url('admin/build/modules'))), | 277 'description' => $t('Update notifications are not enabled. It is <strong>highly recommended</strong> that you enable the update status module from the <a href="@module">module administration page</a> in order to stay up-to-date on new releases. For more information please read the <a href="@update">Update status handbook page</a>.', array('@update' => 'http://drupal.org/handbook/modules/update', '@module' => url('admin/build/modules'))), |
279 } | 279 } |
280 else { | 280 else { |
281 $requirements['update status'] = array( | 281 $requirements['update status'] = array( |
282 'value' => $t('Enabled'), | 282 'value' => $t('Enabled'), |
283 ); | 283 ); |
284 if (variable_get('drupal_http_request_fails', FALSE)) { | |
285 $requirements['http requests'] = array( | |
286 'title' => $t('HTTP request status'), | |
287 'value' => $t('Fails'), | |
288 'severity' => REQUIREMENT_ERROR, | |
289 'description' => $t('Your system or network configuration does not allow Drupal to access web pages, resulting in reduced functionality. This could be due to your webserver configuration or PHP settings, and should be resolved in order to download information about available updates, fetch aggregator feeds, sign in via OpenID, or use other network-dependent services.'), | |
290 ); | |
291 } | |
292 } | 284 } |
293 $requirements['update status']['title'] = $t('Update notifications'); | 285 $requirements['update status']['title'] = $t('Update notifications'); |
286 | |
287 // Check that Drupal can issue HTTP requests. | |
288 if (variable_get('drupal_http_request_fails', TRUE) && !system_check_http_request()) { | |
289 $requirements['http requests'] = array( | |
290 'title' => $t('HTTP request status'), | |
291 'value' => $t('Fails'), | |
292 'severity' => REQUIREMENT_ERROR, | |
293 'description' => $t('Your system or network configuration does not allow Drupal to access web pages, resulting in reduced functionality. This could be due to your webserver configuration or PHP settings, and should be resolved in order to download information about available updates, fetch aggregator feeds, sign in via OpenID, or use other network-dependent services.'), | |
294 ); | |
295 } | |
294 } | 296 } |
295 | 297 |
296 return $requirements; | 298 return $requirements; |
297 } | 299 } |
298 | 300 |
299 /** | 301 /** |
300 * Implementation of hook_install(). | 302 * Implementation of hook_install(). |
301 */ | 303 */ |
302 function system_install() { | 304 function system_install() { |
303 if ($GLOBALS['db_type'] == 'pgsql') { | 305 if ($GLOBALS['db_type'] == 'pgsql') { |
306 // We create some custom types and functions using global names instead of | |
307 // prefixing them like we do with table names. If this function is ever | |
308 // called again (for example, by the test framework when creating prefixed | |
309 // test databases), the global names will already exist. We therefore avoid | |
310 // trying to create them again in that case. | |
311 | |
304 // Create unsigned types. | 312 // Create unsigned types. |
305 db_query("CREATE DOMAIN int_unsigned integer CHECK (VALUE >= 0)"); | 313 if (!db_result(db_query("SELECT COUNT(*) FROM pg_constraint WHERE conname = 'int_unsigned_check'"))) { |
306 db_query("CREATE DOMAIN smallint_unsigned smallint CHECK (VALUE >= 0)"); | 314 db_query("CREATE DOMAIN int_unsigned integer CHECK (VALUE >= 0)"); |
307 db_query("CREATE DOMAIN bigint_unsigned bigint CHECK (VALUE >= 0)"); | 315 } |
316 if (!db_result(db_query("SELECT COUNT(*) FROM pg_constraint WHERE conname = 'smallint_unsigned_check'"))) { | |
317 db_query("CREATE DOMAIN smallint_unsigned smallint CHECK (VALUE >= 0)"); | |
318 } | |
319 if (!db_result(db_query("SELECT COUNT(*) FROM pg_constraint WHERE conname = 'bigint_unsigned_check'"))) { | |
320 db_query("CREATE DOMAIN bigint_unsigned bigint CHECK (VALUE >= 0)"); | |
321 } | |
308 | 322 |
309 // Create functions. | 323 // Create functions. |
310 db_query('CREATE OR REPLACE FUNCTION "greatest"(numeric, numeric) RETURNS numeric AS | 324 db_query('CREATE OR REPLACE FUNCTION "greatest"(numeric, numeric) RETURNS numeric AS |
311 \'SELECT CASE WHEN (($1 > $2) OR ($2 IS NULL)) THEN $1 ELSE $2 END;\' | 325 \'SELECT CASE WHEN (($1 > $2) OR ($2 IS NULL)) THEN $1 ELSE $2 END;\' |
312 LANGUAGE \'sql\'' | 326 LANGUAGE \'sql\'' |
412 function system_schema() { | 426 function system_schema() { |
413 // NOTE: {variable} needs to be created before all other tables, as | 427 // NOTE: {variable} needs to be created before all other tables, as |
414 // some database drivers, e.g. Oracle and DB2, will require variable_get() | 428 // some database drivers, e.g. Oracle and DB2, will require variable_get() |
415 // and variable_set() for overcoming some database specific limitations. | 429 // and variable_set() for overcoming some database specific limitations. |
416 $schema['variable'] = array( | 430 $schema['variable'] = array( |
417 'description' => t('Named variable/value pairs created by Drupal core or any other module or theme. All variables are cached in memory at the start of every Drupal request so developers should not be careless about what is stored here.'), | 431 'description' => 'Named variable/value pairs created by Drupal core or any other module or theme. All variables are cached in memory at the start of every Drupal request so developers should not be careless about what is stored here.', |
418 'fields' => array( | 432 'fields' => array( |
419 'name' => array( | 433 'name' => array( |
420 'description' => t('The name of the variable.'), | 434 'description' => 'The name of the variable.', |
421 'type' => 'varchar', | 435 'type' => 'varchar', |
422 'length' => 128, | 436 'length' => 128, |
423 'not null' => TRUE, | 437 'not null' => TRUE, |
424 'default' => ''), | 438 'default' => ''), |
425 'value' => array( | 439 'value' => array( |
426 'description' => t('The value of the variable.'), | 440 'description' => 'The value of the variable.', |
427 'type' => 'text', | 441 'type' => 'text', |
428 'not null' => TRUE, | 442 'not null' => TRUE, |
429 'size' => 'big'), | 443 'size' => 'big'), |
430 ), | 444 ), |
431 'primary key' => array('name'), | 445 'primary key' => array('name'), |
432 ); | 446 ); |
433 | 447 |
434 $schema['actions'] = array( | 448 $schema['actions'] = array( |
435 'description' => t('Stores action information.'), | 449 'description' => 'Stores action information.', |
436 'fields' => array( | 450 'fields' => array( |
437 'aid' => array( | 451 'aid' => array( |
438 'description' => t('Primary Key: Unique actions ID.'), | 452 'description' => 'Primary Key: Unique actions ID.', |
439 'type' => 'varchar', | 453 'type' => 'varchar', |
440 'length' => 255, | 454 'length' => 255, |
441 'not null' => TRUE, | 455 'not null' => TRUE, |
442 'default' => '0'), | 456 'default' => '0'), |
443 'type' => array( | 457 'type' => array( |
444 'description' => t('The object that that action acts on (node, user, comment, system or custom types.)'), | 458 'description' => 'The object that that action acts on (node, user, comment, system or custom types.)', |
445 'type' => 'varchar', | 459 'type' => 'varchar', |
446 'length' => 32, | 460 'length' => 32, |
447 'not null' => TRUE, | 461 'not null' => TRUE, |
448 'default' => ''), | 462 'default' => ''), |
449 'callback' => array( | 463 'callback' => array( |
450 'description' => t('The callback function that executes when the action runs.'), | 464 'description' => 'The callback function that executes when the action runs.', |
451 'type' => 'varchar', | 465 'type' => 'varchar', |
452 'length' => 255, | 466 'length' => 255, |
453 'not null' => TRUE, | 467 'not null' => TRUE, |
454 'default' => ''), | 468 'default' => ''), |
455 'parameters' => array( | 469 'parameters' => array( |
456 'description' => t('Parameters to be passed to the callback function.'), | 470 'description' => 'Parameters to be passed to the callback function.', |
457 'type' => 'text', | 471 'type' => 'text', |
458 'not null' => TRUE, | 472 'not null' => TRUE, |
459 'size' => 'big'), | 473 'size' => 'big'), |
460 'description' => array( | 474 'description' => array( |
461 'description' => t('Description of the action.'), | 475 'description' => 'Description of the action.', |
462 'type' => 'varchar', | 476 'type' => 'varchar', |
463 'length' => 255, | 477 'length' => 255, |
464 'not null' => TRUE, | 478 'not null' => TRUE, |
465 'default' => '0'), | 479 'default' => '0'), |
466 ), | 480 ), |
467 'primary key' => array('aid'), | 481 'primary key' => array('aid'), |
468 ); | 482 ); |
469 | 483 |
470 $schema['actions_aid'] = array( | 484 $schema['actions_aid'] = array( |
471 'description' => t('Stores action IDs for non-default actions.'), | 485 'description' => 'Stores action IDs for non-default actions.', |
472 'fields' => array( | 486 'fields' => array( |
473 'aid' => array( | 487 'aid' => array( |
474 'description' => t('Primary Key: Unique actions ID.'), | 488 'description' => 'Primary Key: Unique actions ID.', |
475 'type' => 'serial', | 489 'type' => 'serial', |
476 'unsigned' => TRUE, | 490 'unsigned' => TRUE, |
477 'not null' => TRUE), | 491 'not null' => TRUE), |
478 ), | 492 ), |
479 'primary key' => array('aid'), | 493 'primary key' => array('aid'), |
481 | 495 |
482 $schema['batch'] = array( | 496 $schema['batch'] = array( |
483 'description' => t('Stores details about batches (processes that run in multiple HTTP requests).'), | 497 'description' => t('Stores details about batches (processes that run in multiple HTTP requests).'), |
484 'fields' => array( | 498 'fields' => array( |
485 'bid' => array( | 499 'bid' => array( |
486 'description' => t('Primary Key: Unique batch ID.'), | 500 'description' => 'Primary Key: Unique batch ID.', |
487 'type' => 'serial', | 501 'type' => 'serial', |
488 'unsigned' => TRUE, | 502 'unsigned' => TRUE, |
489 'not null' => TRUE), | 503 'not null' => TRUE), |
490 'token' => array( | 504 'token' => array( |
491 'description' => t("A string token generated against the current user's session id and the batch id, used to ensure that only the user who submitted the batch can effectively access it."), | 505 'description' => "A string token generated against the current user's session id and the batch id, used to ensure that only the user who submitted the batch can effectively access it.", |
492 'type' => 'varchar', | 506 'type' => 'varchar', |
493 'length' => 64, | 507 'length' => 64, |
494 'not null' => TRUE), | 508 'not null' => TRUE), |
495 'timestamp' => array( | 509 'timestamp' => array( |
496 'description' => t('A Unix timestamp indicating when this batch was submitted for processing. Stale batches are purged at cron time.'), | 510 'description' => 'A Unix timestamp indicating when this batch was submitted for processing. Stale batches are purged at cron time.', |
497 'type' => 'int', | 511 'type' => 'int', |
498 'not null' => TRUE), | 512 'not null' => TRUE), |
499 'batch' => array( | 513 'batch' => array( |
500 'description' => t('A serialized array containing the processing data for the batch.'), | 514 'description' => 'A serialized array containing the processing data for the batch.', |
501 'type' => 'text', | 515 'type' => 'text', |
502 'not null' => FALSE, | 516 'not null' => FALSE, |
503 'size' => 'big') | 517 'size' => 'big') |
504 ), | 518 ), |
505 'primary key' => array('bid'), | 519 'primary key' => array('bid'), |
506 'indexes' => array('token' => array('token')), | 520 'indexes' => array('token' => array('token')), |
507 ); | 521 ); |
508 | 522 |
509 $schema['cache'] = array( | 523 $schema['cache'] = array( |
510 'description' => t('Generic cache table for caching things not separated out into their own tables. Contributed modules may also use this to store cached items.'), | 524 'description' => 'Generic cache table for caching things not separated out into their own tables. Contributed modules may also use this to store cached items.', |
511 'fields' => array( | 525 'fields' => array( |
512 'cid' => array( | 526 'cid' => array( |
513 'description' => t('Primary Key: Unique cache ID.'), | 527 'description' => 'Primary Key: Unique cache ID.', |
514 'type' => 'varchar', | 528 'type' => 'varchar', |
515 'length' => 255, | 529 'length' => 255, |
516 'not null' => TRUE, | 530 'not null' => TRUE, |
517 'default' => ''), | 531 'default' => ''), |
518 'data' => array( | 532 'data' => array( |
519 'description' => t('A collection of data to cache.'), | 533 'description' => 'A collection of data to cache.', |
520 'type' => 'blob', | 534 'type' => 'blob', |
521 'not null' => FALSE, | 535 'not null' => FALSE, |
522 'size' => 'big'), | 536 'size' => 'big'), |
523 'expire' => array( | 537 'expire' => array( |
524 'description' => t('A Unix timestamp indicating when the cache entry should expire, or 0 for never.'), | 538 'description' => 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.', |
525 'type' => 'int', | 539 'type' => 'int', |
526 'not null' => TRUE, | 540 'not null' => TRUE, |
527 'default' => 0), | 541 'default' => 0), |
528 'created' => array( | 542 'created' => array( |
529 'description' => t('A Unix timestamp indicating when the cache entry was created.'), | 543 'description' => 'A Unix timestamp indicating when the cache entry was created.', |
530 'type' => 'int', | 544 'type' => 'int', |
531 'not null' => TRUE, | 545 'not null' => TRUE, |
532 'default' => 0), | 546 'default' => 0), |
533 'headers' => array( | 547 'headers' => array( |
534 'description' => t('Any custom HTTP headers to be added to cached data.'), | 548 'description' => 'Any custom HTTP headers to be added to cached data.', |
535 'type' => 'text', | 549 'type' => 'text', |
536 'not null' => FALSE), | 550 'not null' => FALSE), |
537 'serialized' => array( | 551 'serialized' => array( |
538 'description' => t('A flag to indicate whether content is serialized (1) or not (0).'), | 552 'description' => 'A flag to indicate whether content is serialized (1) or not (0).', |
539 'type' => 'int', | 553 'type' => 'int', |
540 'size' => 'small', | 554 'size' => 'small', |
541 'not null' => TRUE, | 555 'not null' => TRUE, |
542 'default' => 0) | 556 'default' => 0) |
543 ), | 557 ), |
544 'indexes' => array('expire' => array('expire')), | 558 'indexes' => array('expire' => array('expire')), |
545 'primary key' => array('cid'), | 559 'primary key' => array('cid'), |
546 ); | 560 ); |
547 | 561 |
548 $schema['cache_form'] = $schema['cache']; | 562 $schema['cache_form'] = $schema['cache']; |
549 $schema['cache_form']['description'] = t('Cache table for the form system to store recently built forms and their storage data, to be used in subsequent page requests.'); | 563 $schema['cache_form']['description'] = 'Cache table for the form system to store recently built forms and their storage data, to be used in subsequent page requests.'; |
550 $schema['cache_page'] = $schema['cache']; | 564 $schema['cache_page'] = $schema['cache']; |
551 $schema['cache_page']['description'] = t('Cache table used to store compressed pages for anonymous users, if page caching is enabled.'); | 565 $schema['cache_page']['description'] = 'Cache table used to store compressed pages for anonymous users, if page caching is enabled.'; |
552 $schema['cache_menu'] = $schema['cache']; | 566 $schema['cache_menu'] = $schema['cache']; |
553 $schema['cache_menu']['description'] = t('Cache table for the menu system to store router information as well as generated link trees for various menu/page/user combinations.'); | 567 $schema['cache_menu']['description'] = 'Cache table for the menu system to store router information as well as generated link trees for various menu/page/user combinations.'; |
554 | 568 |
555 $schema['files'] = array( | 569 $schema['files'] = array( |
556 'description' => t('Stores information for uploaded files.'), | 570 'description' => 'Stores information for uploaded files.', |
557 'fields' => array( | 571 'fields' => array( |
558 'fid' => array( | 572 'fid' => array( |
559 'description' => t('Primary Key: Unique files ID.'), | 573 'description' => 'Primary Key: Unique files ID.', |
560 'type' => 'serial', | 574 'type' => 'serial', |
561 'unsigned' => TRUE, | 575 'unsigned' => TRUE, |
562 'not null' => TRUE), | 576 'not null' => TRUE), |
563 'uid' => array( | 577 'uid' => array( |
564 'description' => t('The {users}.uid of the user who is associated with the file.'), | 578 'description' => 'The {users}.uid of the user who is associated with the file.', |
565 'type' => 'int', | 579 'type' => 'int', |
566 'unsigned' => TRUE, | 580 'unsigned' => TRUE, |
567 'not null' => TRUE, | 581 'not null' => TRUE, |
568 'default' => 0), | 582 'default' => 0), |
569 'filename' => array( | 583 'filename' => array( |
570 'description' => t('Name of the file.'), | 584 'description' => 'Name of the file.', |
571 'type' => 'varchar', | 585 'type' => 'varchar', |
572 'length' => 255, | 586 'length' => 255, |
573 'not null' => TRUE, | 587 'not null' => TRUE, |
574 'default' => ''), | 588 'default' => ''), |
575 'filepath' => array( | 589 'filepath' => array( |
576 'description' => t('Path of the file relative to Drupal root.'), | 590 'description' => 'Path of the file relative to Drupal root.', |
577 'type' => 'varchar', | 591 'type' => 'varchar', |
578 'length' => 255, | 592 'length' => 255, |
579 'not null' => TRUE, | 593 'not null' => TRUE, |
580 'default' => ''), | 594 'default' => ''), |
581 'filemime' => array( | 595 'filemime' => array( |
582 'description' => t('The file MIME type.'), | 596 'description' => 'The file MIME type.', |
583 'type' => 'varchar', | 597 'type' => 'varchar', |
584 'length' => 255, | 598 'length' => 255, |
585 'not null' => TRUE, | 599 'not null' => TRUE, |
586 'default' => ''), | 600 'default' => ''), |
587 'filesize' => array( | 601 'filesize' => array( |
588 'description' => t('The size of the file in bytes.'), | 602 'description' => 'The size of the file in bytes.', |
589 'type' => 'int', | 603 'type' => 'int', |
590 'unsigned' => TRUE, | 604 'unsigned' => TRUE, |
591 'not null' => TRUE, | 605 'not null' => TRUE, |
592 'default' => 0), | 606 'default' => 0), |
593 'status' => array( | 607 'status' => array( |
594 'description' => t('A flag indicating whether file is temporary (1) or permanent (0).'), | 608 'description' => 'A flag indicating whether file is temporary (1) or permanent (0).', |
595 'type' => 'int', | 609 'type' => 'int', |
596 'not null' => TRUE, | 610 'not null' => TRUE, |
597 'default' => 0), | 611 'default' => 0), |
598 'timestamp' => array( | 612 'timestamp' => array( |
599 'description' => t('UNIX timestamp for when the file was added.'), | 613 'description' => 'UNIX timestamp for when the file was added.', |
600 'type' => 'int', | 614 'type' => 'int', |
601 'unsigned' => TRUE, | 615 'unsigned' => TRUE, |
602 'not null' => TRUE, | 616 'not null' => TRUE, |
603 'default' => 0), | 617 'default' => 0), |
604 ), | 618 ), |
609 ), | 623 ), |
610 'primary key' => array('fid'), | 624 'primary key' => array('fid'), |
611 ); | 625 ); |
612 | 626 |
613 $schema['flood'] = array( | 627 $schema['flood'] = array( |
614 'description' => t('Flood controls the threshold of events, such as the number of contact attempts.'), | 628 'description' => 'Flood controls the threshold of events, such as the number of contact attempts.', |
615 'fields' => array( | 629 'fields' => array( |
616 'fid' => array( | 630 'fid' => array( |
617 'description' => t('Unique flood event ID.'), | 631 'description' => 'Unique flood event ID.', |
618 'type' => 'serial', | 632 'type' => 'serial', |
619 'not null' => TRUE), | 633 'not null' => TRUE), |
620 'event' => array( | 634 'event' => array( |
621 'description' => t('Name of event (e.g. contact).'), | 635 'description' => 'Name of event (e.g. contact).', |
622 'type' => 'varchar', | 636 'type' => 'varchar', |
623 'length' => 64, | 637 'length' => 64, |
624 'not null' => TRUE, | 638 'not null' => TRUE, |
625 'default' => ''), | 639 'default' => ''), |
626 'hostname' => array( | 640 'hostname' => array( |
627 'description' => t('Hostname of the visitor.'), | 641 'description' => 'Hostname of the visitor.', |
628 'type' => 'varchar', | 642 'type' => 'varchar', |
629 'length' => 128, | 643 'length' => 128, |
630 'not null' => TRUE, | 644 'not null' => TRUE, |
631 'default' => ''), | 645 'default' => ''), |
632 'timestamp' => array( | 646 'timestamp' => array( |
633 'description' => t('Timestamp of the event.'), | 647 'description' => 'Timestamp of the event.', |
634 'type' => 'int', | 648 'type' => 'int', |
635 'not null' => TRUE, | 649 'not null' => TRUE, |
636 'default' => 0) | 650 'default' => 0) |
637 ), | 651 ), |
638 'primary key' => array('fid'), | 652 'primary key' => array('fid'), |
640 'allow' => array('event', 'hostname', 'timestamp'), | 654 'allow' => array('event', 'hostname', 'timestamp'), |
641 ), | 655 ), |
642 ); | 656 ); |
643 | 657 |
644 $schema['history'] = array( | 658 $schema['history'] = array( |
645 'description' => t('A record of which {users} have read which {node}s.'), | 659 'description' => 'A record of which {users} have read which {node}s.', |
646 'fields' => array( | 660 'fields' => array( |
647 'uid' => array( | 661 'uid' => array( |
648 'description' => t('The {users}.uid that read the {node} nid.'), | 662 'description' => 'The {users}.uid that read the {node} nid.', |
649 'type' => 'int', | 663 'type' => 'int', |
650 'not null' => TRUE, | 664 'not null' => TRUE, |
651 'default' => 0), | 665 'default' => 0), |
652 'nid' => array( | 666 'nid' => array( |
653 'description' => t('The {node}.nid that was read.'), | 667 'description' => 'The {node}.nid that was read.', |
654 'type' => 'int', | 668 'type' => 'int', |
655 'not null' => TRUE, | 669 'not null' => TRUE, |
656 'default' => 0), | 670 'default' => 0), |
657 'timestamp' => array( | 671 'timestamp' => array( |
658 'description' => t('The Unix timestamp at which the read occurred.'), | 672 'description' => 'The Unix timestamp at which the read occurred.', |
659 'type' => 'int', | 673 'type' => 'int', |
660 'not null' => TRUE, | 674 'not null' => TRUE, |
661 'default' => 0) | 675 'default' => 0) |
662 ), | 676 ), |
663 'primary key' => array('uid', 'nid'), | 677 'primary key' => array('uid', 'nid'), |
664 'indexes' => array( | 678 'indexes' => array( |
665 'nid' => array('nid'), | 679 'nid' => array('nid'), |
666 ), | 680 ), |
667 ); | 681 ); |
668 $schema['menu_router'] = array( | 682 $schema['menu_router'] = array( |
669 'description' => t('Maps paths to various callbacks (access, page and title)'), | 683 'description' => 'Maps paths to various callbacks (access, page and title)', |
670 'fields' => array( | 684 'fields' => array( |
671 'path' => array( | 685 'path' => array( |
672 'description' => t('Primary Key: the Drupal path this entry describes'), | 686 'description' => 'Primary Key: the Drupal path this entry describes', |
673 'type' => 'varchar', | 687 'type' => 'varchar', |
674 'length' => 255, | 688 'length' => 255, |
675 'not null' => TRUE, | 689 'not null' => TRUE, |
676 'default' => ''), | 690 'default' => ''), |
677 'load_functions' => array( | 691 'load_functions' => array( |
678 'description' => t('A serialized array of function names (like node_load) to be called to load an object corresponding to a part of the current path.'), | 692 'description' => 'A serialized array of function names (like node_load) to be called to load an object corresponding to a part of the current path.', |
679 'type' => 'text', | 693 'type' => 'text', |
680 'not null' => TRUE,), | 694 'not null' => TRUE,), |
681 'to_arg_functions' => array( | 695 'to_arg_functions' => array( |
682 'description' => t('A serialized array of function names (like user_uid_optional_to_arg) to be called to replace a part of the router path with another string.'), | 696 'description' => 'A serialized array of function names (like user_uid_optional_to_arg) to be called to replace a part of the router path with another string.', |
683 'type' => 'text', | 697 'type' => 'text', |
684 'not null' => TRUE,), | 698 'not null' => TRUE,), |
685 'access_callback' => array( | 699 'access_callback' => array( |
686 'description' => t('The callback which determines the access to this router path. Defaults to user_access.'), | 700 'description' => 'The callback which determines the access to this router path. Defaults to user_access.', |
687 'type' => 'varchar', | 701 'type' => 'varchar', |
688 'length' => 255, | 702 'length' => 255, |
689 'not null' => TRUE, | 703 'not null' => TRUE, |
690 'default' => ''), | 704 'default' => ''), |
691 'access_arguments' => array( | 705 'access_arguments' => array( |
692 'description' => t('A serialized array of arguments for the access callback.'), | 706 'description' => 'A serialized array of arguments for the access callback.', |
693 'type' => 'text', | 707 'type' => 'text', |
694 'not null' => FALSE), | 708 'not null' => FALSE), |
695 'page_callback' => array( | 709 'page_callback' => array( |
696 'description' => t('The name of the function that renders the page.'), | 710 'description' => 'The name of the function that renders the page.', |
697 'type' => 'varchar', | 711 'type' => 'varchar', |
698 'length' => 255, | 712 'length' => 255, |
699 'not null' => TRUE, | 713 'not null' => TRUE, |
700 'default' => ''), | 714 'default' => ''), |
701 'page_arguments' => array( | 715 'page_arguments' => array( |
702 'description' => t('A serialized array of arguments for the page callback.'), | 716 'description' => 'A serialized array of arguments for the page callback.', |
703 'type' => 'text', | 717 'type' => 'text', |
704 'not null' => FALSE), | 718 'not null' => FALSE), |
705 'fit' => array( | 719 'fit' => array( |
706 'description' => t('A numeric representation of how specific the path is.'), | 720 'description' => 'A numeric representation of how specific the path is.', |
707 'type' => 'int', | 721 'type' => 'int', |
708 'not null' => TRUE, | 722 'not null' => TRUE, |
709 'default' => 0), | 723 'default' => 0), |
710 'number_parts' => array( | 724 'number_parts' => array( |
711 'description' => t('Number of parts in this router path.'), | 725 'description' => 'Number of parts in this router path.', |
712 'type' => 'int', | 726 'type' => 'int', |
713 'not null' => TRUE, | 727 'not null' => TRUE, |
714 'default' => 0, | 728 'default' => 0, |
715 'size' => 'small'), | 729 'size' => 'small'), |
716 'tab_parent' => array( | 730 'tab_parent' => array( |
717 'description' => t('Only for local tasks (tabs) - the router path of the parent page (which may also be a local task).'), | 731 'description' => 'Only for local tasks (tabs) - the router path of the parent page (which may also be a local task).', |
718 'type' => 'varchar', | 732 'type' => 'varchar', |
719 'length' => 255, | 733 'length' => 255, |
720 'not null' => TRUE, | 734 'not null' => TRUE, |
721 'default' => ''), | 735 'default' => ''), |
722 'tab_root' => array( | 736 'tab_root' => array( |
723 'description' => t('Router path of the closest non-tab parent page. For pages that are not local tasks, this will be the same as the path.'), | 737 'description' => 'Router path of the closest non-tab parent page. For pages that are not local tasks, this will be the same as the path.', |
724 'type' => 'varchar', | 738 'type' => 'varchar', |
725 'length' => 255, | 739 'length' => 255, |
726 'not null' => TRUE, | 740 'not null' => TRUE, |
727 'default' => ''), | 741 'default' => ''), |
728 'title' => array( | 742 'title' => array( |
729 'description' => t('The title for the current page, or the title for the tab if this is a local task.'), | 743 'description' => 'The title for the current page, or the title for the tab if this is a local task.', |
730 'type' => 'varchar', | 744 'type' => 'varchar', |
731 'length' => 255, | 745 'length' => 255, |
732 'not null' => TRUE, | 746 'not null' => TRUE, |
733 'default' => ''), | 747 'default' => ''), |
734 'title_callback' => array( | 748 'title_callback' => array( |
735 'description' => t('A function which will alter the title. Defaults to t()'), | 749 'description' => 'A function which will alter the title. Defaults to t()', |
736 'type' => 'varchar', | 750 'type' => 'varchar', |
737 'length' => 255, | 751 'length' => 255, |
738 'not null' => TRUE, | 752 'not null' => TRUE, |
739 'default' => ''), | 753 'default' => ''), |
740 'title_arguments' => array( | 754 'title_arguments' => array( |
741 'description' => t('A serialized array of arguments for the title callback. If empty, the title will be used as the sole argument for the title callback.'), | 755 'description' => 'A serialized array of arguments for the title callback. If empty, the title will be used as the sole argument for the title callback.', |
742 'type' => 'varchar', | 756 'type' => 'varchar', |
743 'length' => 255, | 757 'length' => 255, |
744 'not null' => TRUE, | 758 'not null' => TRUE, |
745 'default' => ''), | 759 'default' => ''), |
746 'type' => array( | 760 'type' => array( |
747 'description' => t('Numeric representation of the type of the menu item, like MENU_LOCAL_TASK.'), | 761 'description' => 'Numeric representation of the type of the menu item, like MENU_LOCAL_TASK.', |
748 'type' => 'int', | 762 'type' => 'int', |
749 'not null' => TRUE, | 763 'not null' => TRUE, |
750 'default' => 0), | 764 'default' => 0), |
751 'block_callback' => array( | 765 'block_callback' => array( |
752 'description' => t('Name of a function used to render the block on the system administration page for this item.'), | 766 'description' => 'Name of a function used to render the block on the system administration page for this item.', |
753 'type' => 'varchar', | 767 'type' => 'varchar', |
754 'length' => 255, | 768 'length' => 255, |
755 'not null' => TRUE, | 769 'not null' => TRUE, |
756 'default' => ''), | 770 'default' => ''), |
757 'description' => array( | 771 'description' => array( |
758 'description' => t('A description of this item.'), | 772 'description' => 'A description of this item.', |
759 'type' => 'text', | 773 'type' => 'text', |
760 'not null' => TRUE), | 774 'not null' => TRUE), |
761 'position' => array( | 775 'position' => array( |
762 'description' => t('The position of the block (left or right) on the system administration page for this item.'), | 776 'description' => 'The position of the block (left or right) on the system administration page for this item.', |
763 'type' => 'varchar', | 777 'type' => 'varchar', |
764 'length' => 255, | 778 'length' => 255, |
765 'not null' => TRUE, | 779 'not null' => TRUE, |
766 'default' => ''), | 780 'default' => ''), |
767 'weight' => array( | 781 'weight' => array( |
768 'description' => t('Weight of the element. Lighter weights are higher up, heavier weights go down.'), | 782 'description' => 'Weight of the element. Lighter weights are higher up, heavier weights go down.', |
769 'type' => 'int', | 783 'type' => 'int', |
770 'not null' => TRUE, | 784 'not null' => TRUE, |
771 'default' => 0), | 785 'default' => 0), |
772 'file' => array( | 786 'file' => array( |
773 'description' => t('The file to include for this element, usually the page callback function lives in this file.'), | 787 'description' => 'The file to include for this element, usually the page callback function lives in this file.', |
774 'type' => 'text', | 788 'type' => 'text', |
775 'size' => 'medium') | 789 'size' => 'medium') |
776 ), | 790 ), |
777 'indexes' => array( | 791 'indexes' => array( |
778 'fit' => array('fit'), | 792 'fit' => array('fit'), |
780 ), | 794 ), |
781 'primary key' => array('path'), | 795 'primary key' => array('path'), |
782 ); | 796 ); |
783 | 797 |
784 $schema['menu_links'] = array( | 798 $schema['menu_links'] = array( |
785 'description' => t('Contains the individual links within a menu.'), | 799 'description' => 'Contains the individual links within a menu.', |
786 'fields' => array( | 800 'fields' => array( |
787 'menu_name' => array( | 801 'menu_name' => array( |
788 'description' => t("The menu name. All links with the same menu name (such as 'navigation') are part of the same menu."), | 802 'description' => "The menu name. All links with the same menu name (such as 'navigation') are part of the same menu.", |
789 'type' => 'varchar', | 803 'type' => 'varchar', |
790 'length' => 32, | 804 'length' => 32, |
791 'not null' => TRUE, | 805 'not null' => TRUE, |
792 'default' => ''), | 806 'default' => ''), |
793 'mlid' => array( | 807 'mlid' => array( |
794 'description' => t('The menu link ID (mlid) is the integer primary key.'), | 808 'description' => 'The menu link ID (mlid) is the integer primary key.', |
795 'type' => 'serial', | 809 'type' => 'serial', |
796 'unsigned' => TRUE, | 810 'unsigned' => TRUE, |
797 'not null' => TRUE), | 811 'not null' => TRUE), |
798 'plid' => array( | 812 'plid' => array( |
799 'description' => t('The parent link ID (plid) is the mlid of the link above in the hierarchy, or zero if the link is at the top level in its menu.'), | 813 'description' => 'The parent link ID (plid) is the mlid of the link above in the hierarchy, or zero if the link is at the top level in its menu.', |
800 'type' => 'int', | 814 'type' => 'int', |
801 'unsigned' => TRUE, | 815 'unsigned' => TRUE, |
802 'not null' => TRUE, | 816 'not null' => TRUE, |
803 'default' => 0), | 817 'default' => 0), |
804 'link_path' => array( | 818 'link_path' => array( |
805 'description' => t('The Drupal path or external path this link points to.'), | 819 'description' => 'The Drupal path or external path this link points to.', |
806 'type' => 'varchar', | 820 'type' => 'varchar', |
807 'length' => 255, | 821 'length' => 255, |
808 'not null' => TRUE, | 822 'not null' => TRUE, |
809 'default' => ''), | 823 'default' => ''), |
810 'router_path' => array( | 824 'router_path' => array( |
811 'description' => t('For links corresponding to a Drupal path (external = 0), this connects the link to a {menu_router}.path for joins.'), | 825 'description' => 'For links corresponding to a Drupal path (external = 0), this connects the link to a {menu_router}.path for joins.', |
812 'type' => 'varchar', | 826 'type' => 'varchar', |
813 'length' => 255, | 827 'length' => 255, |
814 'not null' => TRUE, | 828 'not null' => TRUE, |
815 'default' => ''), | 829 'default' => ''), |
816 'link_title' => array( | 830 'link_title' => array( |
817 'description' => t('The text displayed for the link, which may be modified by a title callback stored in {menu_router}.'), | 831 'description' => 'The text displayed for the link, which may be modified by a title callback stored in {menu_router}.', |
818 'type' => 'varchar', | 832 'type' => 'varchar', |
819 'length' => 255, | 833 'length' => 255, |
820 'not null' => TRUE, | 834 'not null' => TRUE, |
821 'default' => ''), | 835 'default' => ''), |
822 'options' => array( | 836 'options' => array( |
823 'description' => t('A serialized array of options to be passed to the url() or l() function, such as a query string or HTML attributes.'), | 837 'description' => 'A serialized array of options to be passed to the url() or l() function, such as a query string or HTML attributes.', |
824 'type' => 'text', | 838 'type' => 'text', |
825 'not null' => FALSE), | 839 'not null' => FALSE), |
826 'module' => array( | 840 'module' => array( |
827 'description' => t('The name of the module that generated this link.'), | 841 'description' => 'The name of the module that generated this link.', |
828 'type' => 'varchar', | 842 'type' => 'varchar', |
829 'length' => 255, | 843 'length' => 255, |
830 'not null' => TRUE, | 844 'not null' => TRUE, |
831 'default' => 'system'), | 845 'default' => 'system'), |
832 'hidden' => array( | 846 'hidden' => array( |
833 'description' => t('A flag for whether the link should be rendered in menus. (1 = a disabled menu item that may be shown on admin screens, -1 = a menu callback, 0 = a normal, visible link)'), | 847 'description' => 'A flag for whether the link should be rendered in menus. (1 = a disabled menu item that may be shown on admin screens, -1 = a menu callback, 0 = a normal, visible link)', |
834 'type' => 'int', | 848 'type' => 'int', |
835 'not null' => TRUE, | 849 'not null' => TRUE, |
836 'default' => 0, | 850 'default' => 0, |
837 'size' => 'small'), | 851 'size' => 'small'), |
838 'external' => array( | 852 'external' => array( |
839 'description' => t('A flag to indicate if the link points to a full URL starting with a protocol, like http:// (1 = external, 0 = internal).'), | 853 'description' => 'A flag to indicate if the link points to a full URL starting with a protocol, like http:// (1 = external, 0 = internal).', |
840 'type' => 'int', | 854 'type' => 'int', |
841 'not null' => TRUE, | 855 'not null' => TRUE, |
842 'default' => 0, | 856 'default' => 0, |
843 'size' => 'small'), | 857 'size' => 'small'), |
844 'has_children' => array( | 858 'has_children' => array( |
845 'description' => t('Flag indicating whether any links have this link as a parent (1 = children exist, 0 = no children).'), | 859 'description' => 'Flag indicating whether any links have this link as a parent (1 = children exist, 0 = no children).', |
846 'type' => 'int', | 860 'type' => 'int', |
847 'not null' => TRUE, | 861 'not null' => TRUE, |
848 'default' => 0, | 862 'default' => 0, |
849 'size' => 'small'), | 863 'size' => 'small'), |
850 'expanded' => array( | 864 'expanded' => array( |
851 'description' => t('Flag for whether this link should be rendered as expanded in menus - expanded links always have their child links displayed, instead of only when the link is in the active trail (1 = expanded, 0 = not expanded)'), | 865 'description' => 'Flag for whether this link should be rendered as expanded in menus - expanded links always have their child links displayed, instead of only when the link is in the active trail (1 = expanded, 0 = not expanded)', |
852 'type' => 'int', | 866 'type' => 'int', |
853 'not null' => TRUE, | 867 'not null' => TRUE, |
854 'default' => 0, | 868 'default' => 0, |
855 'size' => 'small'), | 869 'size' => 'small'), |
856 'weight' => array( | 870 'weight' => array( |
857 'description' => t('Link weight among links in the same menu at the same depth.'), | 871 'description' => 'Link weight among links in the same menu at the same depth.', |
858 'type' => 'int', | 872 'type' => 'int', |
859 'not null' => TRUE, | 873 'not null' => TRUE, |
860 'default' => 0), | 874 'default' => 0), |
861 'depth' => array( | 875 'depth' => array( |
862 'description' => t('The depth relative to the top level. A link with plid == 0 will have depth == 1.'), | 876 'description' => 'The depth relative to the top level. A link with plid == 0 will have depth == 1.', |
863 'type' => 'int', | 877 'type' => 'int', |
864 'not null' => TRUE, | 878 'not null' => TRUE, |
865 'default' => 0, | 879 'default' => 0, |
866 'size' => 'small'), | 880 'size' => 'small'), |
867 'customized' => array( | 881 'customized' => array( |
868 'description' => t('A flag to indicate that the user has manually created or edited the link (1 = customized, 0 = not customized).'), | 882 'description' => 'A flag to indicate that the user has manually created or edited the link (1 = customized, 0 = not customized).', |
869 'type' => 'int', | 883 'type' => 'int', |
870 'not null' => TRUE, | 884 'not null' => TRUE, |
871 'default' => 0, | 885 'default' => 0, |
872 'size' => 'small'), | 886 'size' => 'small'), |
873 'p1' => array( | 887 'p1' => array( |
874 'description' => t('The first mlid in the materialized path. If N = depth, then pN must equal the mlid. If depth > 1 then p(N-1) must equal the plid. All pX where X > depth must equal zero. The columns p1 .. p9 are also called the parents.'), | 888 'description' => 'The first mlid in the materialized path. If N = depth, then pN must equal the mlid. If depth > 1 then p(N-1) must equal the plid. All pX where X > depth must equal zero. The columns p1 .. p9 are also called the parents.', |
875 'type' => 'int', | 889 'type' => 'int', |
876 'unsigned' => TRUE, | 890 'unsigned' => TRUE, |
877 'not null' => TRUE, | 891 'not null' => TRUE, |
878 'default' => 0), | 892 'default' => 0), |
879 'p2' => array( | 893 'p2' => array( |
880 'description' => t('The second mlid in the materialized path. See p1.'), | 894 'description' => 'The second mlid in the materialized path. See p1.', |
881 'type' => 'int', | 895 'type' => 'int', |
882 'unsigned' => TRUE, | 896 'unsigned' => TRUE, |
883 'not null' => TRUE, | 897 'not null' => TRUE, |
884 'default' => 0), | 898 'default' => 0), |
885 'p3' => array( | 899 'p3' => array( |
886 'description' => t('The third mlid in the materialized path. See p1.'), | 900 'description' => 'The third mlid in the materialized path. See p1.', |
887 'type' => 'int', | 901 'type' => 'int', |
888 'unsigned' => TRUE, | 902 'unsigned' => TRUE, |
889 'not null' => TRUE, | 903 'not null' => TRUE, |
890 'default' => 0), | 904 'default' => 0), |
891 'p4' => array( | 905 'p4' => array( |
892 'description' => t('The fourth mlid in the materialized path. See p1.'), | 906 'description' => 'The fourth mlid in the materialized path. See p1.', |
893 'type' => 'int', | 907 'type' => 'int', |
894 'unsigned' => TRUE, | 908 'unsigned' => TRUE, |
895 'not null' => TRUE, | 909 'not null' => TRUE, |
896 'default' => 0), | 910 'default' => 0), |
897 'p5' => array( | 911 'p5' => array( |
898 'description' => t('The fifth mlid in the materialized path. See p1.'), | 912 'description' => 'The fifth mlid in the materialized path. See p1.', |
899 'type' => 'int', | 913 'type' => 'int', |
900 'unsigned' => TRUE, | 914 'unsigned' => TRUE, |
901 'not null' => TRUE, | 915 'not null' => TRUE, |
902 'default' => 0), | 916 'default' => 0), |
903 'p6' => array( | 917 'p6' => array( |
904 'description' => t('The sixth mlid in the materialized path. See p1.'), | 918 'description' => 'The sixth mlid in the materialized path. See p1.', |
905 'type' => 'int', | 919 'type' => 'int', |
906 'unsigned' => TRUE, | 920 'unsigned' => TRUE, |
907 'not null' => TRUE, | 921 'not null' => TRUE, |
908 'default' => 0), | 922 'default' => 0), |
909 'p7' => array( | 923 'p7' => array( |
910 'description' => t('The seventh mlid in the materialized path. See p1.'), | 924 'description' => 'The seventh mlid in the materialized path. See p1.', |
911 'type' => 'int', | 925 'type' => 'int', |
912 'unsigned' => TRUE, | 926 'unsigned' => TRUE, |
913 'not null' => TRUE, | 927 'not null' => TRUE, |
914 'default' => 0), | 928 'default' => 0), |
915 'p8' => array( | 929 'p8' => array( |
916 'description' => t('The eighth mlid in the materialized path. See p1.'), | 930 'description' => 'The eighth mlid in the materialized path. See p1.', |
917 'type' => 'int', | 931 'type' => 'int', |
918 'unsigned' => TRUE, | 932 'unsigned' => TRUE, |
919 'not null' => TRUE, | 933 'not null' => TRUE, |
920 'default' => 0), | 934 'default' => 0), |
921 'p9' => array( | 935 'p9' => array( |
922 'description' => t('The ninth mlid in the materialized path. See p1.'), | 936 'description' => 'The ninth mlid in the materialized path. See p1.', |
923 'type' => 'int', | 937 'type' => 'int', |
924 'unsigned' => TRUE, | 938 'unsigned' => TRUE, |
925 'not null' => TRUE, | 939 'not null' => TRUE, |
926 'default' => 0), | 940 'default' => 0), |
927 'updated' => array( | 941 'updated' => array( |
928 'description' => t('Flag that indicates that this link was generated during the update from Drupal 5.'), | 942 'description' => 'Flag that indicates that this link was generated during the update from Drupal 5.', |
929 'type' => 'int', | 943 'type' => 'int', |
930 'not null' => TRUE, | 944 'not null' => TRUE, |
931 'default' => 0, | 945 'default' => 0, |
932 'size' => 'small'), | 946 'size' => 'small'), |
933 ), | 947 ), |
941 ), | 955 ), |
942 'primary key' => array('mlid'), | 956 'primary key' => array('mlid'), |
943 ); | 957 ); |
944 | 958 |
945 $schema['sessions'] = array( | 959 $schema['sessions'] = array( |
946 'description' => t("Drupal's session handlers read and write into the sessions table. Each record represents a user session, either anonymous or authenticated."), | 960 'description' => "Drupal's session handlers read and write into the sessions table. Each record represents a user session, either anonymous or authenticated.", |
947 'fields' => array( | 961 'fields' => array( |
948 'uid' => array( | 962 'uid' => array( |
949 'description' => t('The {users}.uid corresponding to a session, or 0 for anonymous user.'), | 963 'description' => 'The {users}.uid corresponding to a session, or 0 for anonymous user.', |
950 'type' => 'int', | 964 'type' => 'int', |
951 'unsigned' => TRUE, | 965 'unsigned' => TRUE, |
952 'not null' => TRUE), | 966 'not null' => TRUE), |
953 'sid' => array( | 967 'sid' => array( |
954 'description' => t("Primary key: A session ID. The value is generated by PHP's Session API."), | 968 'description' => "Primary key: A session ID. The value is generated by PHP's Session API.", |
955 'type' => 'varchar', | 969 'type' => 'varchar', |
956 'length' => 64, | 970 'length' => 64, |
957 'not null' => TRUE, | 971 'not null' => TRUE, |
958 'default' => ''), | 972 'default' => ''), |
959 'hostname' => array( | 973 'hostname' => array( |
960 'description' => t('The IP address that last used this session ID (sid).'), | 974 'description' => 'The IP address that last used this session ID (sid).', |
961 'type' => 'varchar', | 975 'type' => 'varchar', |
962 'length' => 128, | 976 'length' => 128, |
963 'not null' => TRUE, | 977 'not null' => TRUE, |
964 'default' => ''), | 978 'default' => ''), |
965 'timestamp' => array( | 979 'timestamp' => array( |
966 'description' => t('The Unix timestamp when this session last requested a page. Old records are purged by PHP automatically.'), | 980 'description' => 'The Unix timestamp when this session last requested a page. Old records are purged by PHP automatically.', |
967 'type' => 'int', | 981 'type' => 'int', |
968 'not null' => TRUE, | 982 'not null' => TRUE, |
969 'default' => 0), | 983 'default' => 0), |
970 'cache' => array( | 984 'cache' => array( |
971 'description' => t("The time of this user's last post. This is used when the site has specified a minimum_cache_lifetime. See cache_get()."), | 985 'description' => "The time of this user's last post. This is used when the site has specified a minimum_cache_lifetime. See cache_get().", |
972 'type' => 'int', | 986 'type' => 'int', |
973 'not null' => TRUE, | 987 'not null' => TRUE, |
974 'default' => 0), | 988 'default' => 0), |
975 'session' => array( | 989 'session' => array( |
976 'description' => t('The serialized contents of $_SESSION, an array of name/value pairs that persists across page requests by this session ID. Drupal loads $_SESSION from here at the start of each request and saves it at the end.'), | 990 'description' => 'The serialized contents of $_SESSION, an array of name/value pairs that persists across page requests by this session ID. Drupal loads $_SESSION from here at the start of each request and saves it at the end.', |
977 'type' => 'text', | 991 'type' => 'text', |
978 'not null' => FALSE, | 992 'not null' => FALSE, |
979 'size' => 'big') | 993 'size' => 'big') |
980 ), | 994 ), |
981 'primary key' => array('sid'), | 995 'primary key' => array('sid'), |
984 'uid' => array('uid') | 998 'uid' => array('uid') |
985 ), | 999 ), |
986 ); | 1000 ); |
987 | 1001 |
988 $schema['system'] = array( | 1002 $schema['system'] = array( |
989 'description' => t("A list of all modules, themes, and theme engines that are or have been installed in Drupal's file system."), | 1003 'description' => "A list of all modules, themes, and theme engines that are or have been installed in Drupal's file system.", |
990 'fields' => array( | 1004 'fields' => array( |
991 'filename' => array( | 1005 'filename' => array( |
992 'description' => t('The path of the primary file for this item, relative to the Drupal root; e.g. modules/node/node.module.'), | 1006 'description' => 'The path of the primary file for this item, relative to the Drupal root; e.g. modules/node/node.module.', |
993 'type' => 'varchar', | 1007 'type' => 'varchar', |
994 'length' => 255, | 1008 'length' => 255, |
995 'not null' => TRUE, | 1009 'not null' => TRUE, |
996 'default' => ''), | 1010 'default' => ''), |
997 'name' => array( | 1011 'name' => array( |
998 'description' => t('The name of the item; e.g. node.'), | 1012 'description' => 'The name of the item; e.g. node.', |
999 'type' => 'varchar', | 1013 'type' => 'varchar', |
1000 'length' => 255, | 1014 'length' => 255, |
1001 'not null' => TRUE, | 1015 'not null' => TRUE, |
1002 'default' => ''), | 1016 'default' => ''), |
1003 'type' => array( | 1017 'type' => array( |
1004 'description' => t('The type of the item, either module, theme, or theme_engine.'), | 1018 'description' => 'The type of the item, either module, theme, or theme_engine.', |
1005 'type' => 'varchar', | 1019 'type' => 'varchar', |
1006 'length' => 255, | 1020 'length' => 255, |
1007 'not null' => TRUE, | 1021 'not null' => TRUE, |
1008 'default' => ''), | 1022 'default' => ''), |
1009 'owner' => array( | 1023 'owner' => array( |
1010 'description' => t("A theme's 'parent'. Can be either a theme or an engine."), | 1024 'description' => "A theme's 'parent'. Can be either a theme or an engine.", |
1011 'type' => 'varchar', | 1025 'type' => 'varchar', |
1012 'length' => 255, | 1026 'length' => 255, |
1013 'not null' => TRUE, | 1027 'not null' => TRUE, |
1014 'default' => ''), | 1028 'default' => ''), |
1015 'status' => array( | 1029 'status' => array( |
1016 'description' => t('Boolean indicating whether or not this item is enabled.'), | 1030 'description' => 'Boolean indicating whether or not this item is enabled.', |
1017 'type' => 'int', | 1031 'type' => 'int', |
1018 'not null' => TRUE, | 1032 'not null' => TRUE, |
1019 'default' => 0), | 1033 'default' => 0), |
1020 'throttle' => array( | 1034 'throttle' => array( |
1021 'description' => t('Boolean indicating whether this item is disabled when the throttle.module disables throttleable items.'), | 1035 'description' => 'Boolean indicating whether this item is disabled when the throttle.module disables throttleable items.', |
1022 'type' => 'int', | 1036 'type' => 'int', |
1023 'not null' => TRUE, | 1037 'not null' => TRUE, |
1024 'default' => 0, | 1038 'default' => 0, |
1025 'size' => 'tiny'), | 1039 'size' => 'tiny'), |
1026 'bootstrap' => array( | 1040 'bootstrap' => array( |
1027 'description' => t("Boolean indicating whether this module is loaded during Drupal's early bootstrapping phase (e.g. even before the page cache is consulted)."), | 1041 'description' => "Boolean indicating whether this module is loaded during Drupal's early bootstrapping phase (e.g. even before the page cache is consulted).", |
1028 'type' => 'int', | 1042 'type' => 'int', |
1029 'not null' => TRUE, | 1043 'not null' => TRUE, |
1030 'default' => 0), | 1044 'default' => 0), |
1031 'schema_version' => array( | 1045 'schema_version' => array( |
1032 'description' => t("The module's database schema version number. -1 if the module is not installed (its tables do not exist); 0 or the largest N of the module's hook_update_N() function that has either been run or existed when the module was first installed."), | 1046 'description' => "The module's database schema version number. -1 if the module is not installed (its tables do not exist); 0 or the largest N of the module's hook_update_N() function that has either been run or existed when the module was first installed.", |
1033 'type' => 'int', | 1047 'type' => 'int', |
1034 'not null' => TRUE, | 1048 'not null' => TRUE, |
1035 'default' => -1, | 1049 'default' => -1, |
1036 'size' => 'small'), | 1050 'size' => 'small'), |
1037 'weight' => array( | 1051 'weight' => array( |
1038 'description' => t("The order in which this module's hooks should be invoked relative to other modules. Equal-weighted modules are ordered by name."), | 1052 'description' => "The order in which this module's hooks should be invoked relative to other modules. Equal-weighted modules are ordered by name.", |
1039 'type' => 'int', | 1053 'type' => 'int', |
1040 'not null' => TRUE, | 1054 'not null' => TRUE, |
1041 'default' => 0), | 1055 'default' => 0), |
1042 'info' => array( | 1056 'info' => array( |
1043 'description' => t("A serialized array containing information from the module's .info file; keys can include name, description, package, version, core, dependencies, dependents, and php."), | 1057 'description' => "A serialized array containing information from the module's .info file; keys can include name, description, package, version, core, dependencies, dependents, and php.", |
1044 'type' => 'text', | 1058 'type' => 'text', |
1045 'not null' => FALSE) | 1059 'not null' => FALSE) |
1046 ), | 1060 ), |
1047 'primary key' => array('filename'), | 1061 'primary key' => array('filename'), |
1048 'indexes' => | 1062 'indexes' => |
1051 'bootstrap' => array(array('type', 12), 'status', 'bootstrap', 'weight', 'filename'), | 1065 'bootstrap' => array(array('type', 12), 'status', 'bootstrap', 'weight', 'filename'), |
1052 ), | 1066 ), |
1053 ); | 1067 ); |
1054 | 1068 |
1055 $schema['url_alias'] = array( | 1069 $schema['url_alias'] = array( |
1056 'description' => t('A list of URL aliases for Drupal paths; a user may visit either the source or destination path.'), | 1070 'description' => 'A list of URL aliases for Drupal paths; a user may visit either the source or destination path.', |
1057 'fields' => array( | 1071 'fields' => array( |
1058 'pid' => array( | 1072 'pid' => array( |
1059 'description' => t('A unique path alias identifier.'), | 1073 'description' => 'A unique path alias identifier.', |
1060 'type' => 'serial', | 1074 'type' => 'serial', |
1061 'unsigned' => TRUE, | 1075 'unsigned' => TRUE, |
1062 'not null' => TRUE), | 1076 'not null' => TRUE), |
1063 'src' => array( | 1077 'src' => array( |
1064 'description' => t('The Drupal path this alias is for; e.g. node/12.'), | 1078 'description' => 'The Drupal path this alias is for; e.g. node/12.', |
1065 'type' => 'varchar', | 1079 'type' => 'varchar', |
1066 'length' => 128, | 1080 'length' => 128, |
1067 'not null' => TRUE, | 1081 'not null' => TRUE, |
1068 'default' => ''), | 1082 'default' => ''), |
1069 'dst' => array( | 1083 'dst' => array( |
1070 'description' => t('The alias for this path; e.g. title-of-the-story.'), | 1084 'description' => 'The alias for this path; e.g. title-of-the-story.', |
1071 'type' => 'varchar', | 1085 'type' => 'varchar', |
1072 'length' => 128, | 1086 'length' => 128, |
1073 'not null' => TRUE, | 1087 'not null' => TRUE, |
1074 'default' => ''), | 1088 'default' => ''), |
1075 'language' => array( | 1089 'language' => array( |
1076 'description' => t('The language this alias is for; if blank, the alias will be used for unknown languages. Each Drupal path can have an alias for each supported language.'), | 1090 'description' => 'The language this alias is for; if blank, the alias will be used for unknown languages. Each Drupal path can have an alias for each supported language.', |
1077 'type' => 'varchar', | 1091 'type' => 'varchar', |
1078 'length' => 12, | 1092 'length' => 12, |
1079 'not null' => TRUE, | 1093 'not null' => TRUE, |
1080 'default' => '') | 1094 'default' => '') |
1081 ), | 1095 ), |