~views-port/+junk/Views3-d6

« back to all changes in this revision

Viewing changes to tests/views_test.install

  • Committer: dereine
  • Date: 2009-09-13 09:07:31 UTC
  • mfrom: (5.1.3 Views3-d6)
  • Revision ID: dereine@bitschleuder-20090913090731-6whn3o1qprsypxpy
Merged views3-D6 into autoload branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
// $Id$
 
3
 
 
4
function views_test_install() {
 
5
  drupal_install_schema('views_test');
 
6
}
 
7
 
 
8
function views_test_uninstall() {
 
9
  drupal_uninstall_schema('views_test');
 
10
}
 
11
 
 
12
function views_test_schema() {
 
13
  $schema['views_test'] = array(
 
14
    'description' => 'Basic test table for Views tests.',
 
15
    'fields' => array(
 
16
      'id' => array(
 
17
        'type' => 'serial',
 
18
        'unsigned' => TRUE,
 
19
        'not null' => TRUE,
 
20
      ),
 
21
      'name' => array(
 
22
        'description' => "A person's name",
 
23
        'type' => 'varchar',
 
24
        'length' => 255,
 
25
        'not null' => TRUE,
 
26
        'default' => '',
 
27
      ),
 
28
      'age' => array(
 
29
        'description' => "The person's age",
 
30
        'type' => 'int',
 
31
        'unsigned' => TRUE,
 
32
        'not null' => TRUE,
 
33
        'default' => 0),
 
34
      'job' => array(
 
35
        'description' => "The person's job",
 
36
        'type' => 'varchar',
 
37
        'length' => 255,
 
38
        'not null' => TRUE,
 
39
        'default' => 'Undefined',
 
40
      ),
 
41
    ),
 
42
    'primary key' => array('id'),
 
43
    'unique keys' => array(
 
44
      'name' => array('name')
 
45
    ),
 
46
    'indexes' => array(
 
47
      'ages' => array('age'),
 
48
    ),
 
49
  );
 
50
 
 
51
  return $schema;
 
52
}