/[drupal]/contributions/modules/simpletest_automator/simpletest_automator.install
ViewVC logotype

Contents of /contributions/modules/simpletest_automator/simpletest_automator.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.8 - (show annotations) (download) (as text)
Sun May 24 01:29:56 2009 UTC (6 months ago) by cwgordon7
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +0 -2 lines
File MIME type: text/x-php
#323337 by Jody Lynn: text columns should not have default values.
1 <?php
2
3 /**
4 * Implementation of hook_install().
5 */
6 function simpletest_automator_install() {
7 drupal_install_schema('simpletest_automator');
8 }
9
10 /**
11 * Implementation of hook_uninstall().
12 */
13 function simpletest_automator_uninstall() {
14 drupal_uninstall_schema('simpletest_automator');
15 }
16
17 /**
18 * Implementation of hook_schema().
19 */
20 function simpletest_automator_schema() {
21 $schema = array();
22
23 $schema['simpletest_automator'] = array(
24 'description' => t('An awesome table.'),
25 'fields' => array(
26 'said' => array(
27 'description' => t('The unique simpletest automator id.'),
28 'type' => 'serial',
29 'unsigned' => TRUE,
30 'not null' => TRUE
31 ),
32 'name' => array(
33 'description' => t('The human-readable name of the test case.'),
34 'type' => 'varchar',
35 'length' => 255,
36 'not null' => TRUE,
37 'default' => '',
38 ),
39 'description' => array(
40 'description' => t('The human-readable description of the test case.'),
41 'type' => 'varchar',
42 'length' => 255,
43 'not null' => TRUE,
44 'default' => '',
45 ),
46 'test_group' => array(
47 'description' => t('The human-readable group of the test case.'),
48 'type' => 'varchar',
49 'length' => 255,
50 'not null' => TRUE,
51 'default' => '',
52 ),
53 'file' => array(
54 'description' => t('The file name of the test case.'),
55 'type' => 'varchar',
56 'length' => 255,
57 'not null' => TRUE,
58 'default' => '',
59 ),
60 'class' => array(
61 'description' => t('The name of the test class in use.'),
62 'type' => 'varchar',
63 'length' => 255,
64 'not null' => TRUE,
65 'default' => '',
66 ),
67 'method' => array(
68 'description' => t('The name of the test method in use.'),
69 'type' => 'varchar',
70 'length' => 255,
71 'not null' => TRUE,
72 'default' => '',
73 ),
74 'modules' => array(
75 'description' => t('The serialized array of modules that this test will use.'),
76 'type' => 'text',
77 'size' => 'medium',
78 'not null' => TRUE,
79 ),
80 'permissions' => array(
81 'description' => t('A serialized array of permissions for the user.'),
82 'type' => 'text',
83 'size' => 'medium',
84 'not null' => TRUE,
85 ),
86 'db_prefix' => array(
87 'description' => t('The DB prefix of the database that this test is in.'),
88 'type' => 'varchar',
89 'length' => 255,
90 'not null' => TRUE,
91 'default' => '',
92 ),
93 ),
94 'primary key' => array('said'),
95 );
96
97 $schema['simpletest_automator_actions'] = array(
98 'description' => t('Another awesome table.'),
99 'fields' => array(
100 'said' => array(
101 'description' => t('The simpletest automator id.'),
102 'type' => 'int',
103 'unsigned' => TRUE,
104 'not null' => TRUE,
105 'default' => 0,
106 ),
107 'aid' => array(
108 'description' => t('The unique action id.'),
109 'type' => 'serial',
110 'unsigned' => TRUE,
111 'not null' => TRUE
112 ),
113 'type' => array(
114 'description' => t('The type of the action.'),
115 'type' => 'varchar',
116 'length' => 255,
117 'not null' => TRUE,
118 'default' => '',
119 ),
120 'weight' => array(
121 'description' => t('The weight of the action.'),
122 'type' => 'int',
123 'unsigned' => FALSE,
124 'not null' => TRUE,
125 'default' => 0,
126 ),
127 'parameters' => array(
128 'description' => t('A serialized array of parameters.'),
129 'type' => 'text',
130 'not null' => FALSE,
131 ),
132 ),
133 'indexes' => array(
134 'said' => array('said'),
135 'type' => array('type'),
136 ),
137 'primary key' => array('aid'),
138 );
139
140 return $schema;
141 }

  ViewVC Help
Powered by ViewVC 1.1.2