Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
#
2
# PHPUnit
3
#
4
# Copyright (c) 2002-2009, Sebastian Bergmann <sb@sebastian-bergmann.de>.
5
# All rights reserved.
6
#
7
# Redistribution and use in source and binary forms, with or without
8
# modification, are permitted provided that the following conditions
9
# are met:
10
#
11
#   * Redistributions of source code must retain the above copyright
12
#     notice, this list of conditions and the following disclaimer.
13
#
14
#   * Redistributions in binary form must reproduce the above copyright
15
#     notice, this list of conditions and the following disclaimer in
16
#     the documentation and/or other materials provided with the
17
#     distribution.
18
#
19
#   * Neither the name of Sebastian Bergmann nor the names of his
20
#     contributors may be used to endorse or promote products derived
21
#     from this software without specific prior written permission.
22
#
23
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34
# POSSIBILITY OF SUCH DAMAGE.
35
#
36
# $Id$
37
#
38
 
39
CREATE TABLE IF NOT EXISTS run(
40
  run_id      INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
41
  timestamp   INTEGER UNSIGNED NOT NULL,
42
  revision    INTEGER UNSIGNED NOT NULL,
43
  information TEXT             NOT NULL,
44
  completed   BOOLEAN          NOT NULL DEFAULT 0
45
) ENGINE=InnoDB;
46
 
47
CREATE TABLE IF NOT EXISTS test(
48
  run_id              INTEGER UNSIGNED NOT NULL REFERENCES run.run_id,
49
  test_id             INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
50
  test_name           CHAR(128)        NOT NULL,
51
  test_result         TINYINT UNSIGNED NOT NULL DEFAULT 0,
52
  test_message        TEXT             NOT NULL DEFAULT "",
53
  test_execution_time FLOAT   UNSIGNED NOT NULL DEFAULT 0,
54
  code_method_id      INTEGER UNSIGNED          REFERENCES code_method.code_method_id,
55
  node_root           INTEGER UNSIGNED NOT NULL,
56
  node_left           INTEGER UNSIGNED NOT NULL,
57
  node_right          INTEGER UNSIGNED NOT NULL,
58
  node_parent         INTEGER UNSIGNED NOT NULL,
59
  node_depth          TINYINT UNSIGNED NOT NULL,
60
  node_is_leaf        BOOLEAN          NOT NULL DEFAULT 0,
61
 
62
  INDEX (run_id),
63
  INDEX (test_result),
64
  INDEX (code_method_id),
65
  INDEX (node_root),
66
  INDEX (node_left),
67
  INDEX (node_right),
68
  INDEX (node_parent)
69
) ENGINE=InnoDB;
70
 
71
CREATE TABLE IF NOT EXISTS code_file(
72
  code_file_id        INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
73
  code_file_name      CHAR(255),
74
  code_full_file_name CHAR(255),
75
  code_file_md5       CHAR(32),
76
  revision            INTEGER UNSIGNED NOT NULL
77
) ENGINE=InnoDB;
78
 
79
CREATE TABLE IF NOT EXISTS code_function(
80
  code_file_id             INTEGER UNSIGNED NOT NULL REFERENCES code_file.code_file_id,
81
  code_function_id         INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
82
  code_function_name       CHAR(255),
83
  code_function_start_line INTEGER UNSIGNED NOT NULL,
84
  code_function_end_line   INTEGER UNSIGNED NOT NULL,
85
 
86
  INDEX (code_file_id)
87
) ENGINE=InnoDB;
88
 
89
CREATE TABLE IF NOT EXISTS code_class(
90
  code_file_id          INTEGER UNSIGNED NOT NULL REFERENCES code_file.code_file_id,
91
  code_class_id         INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
92
  code_class_parent_id  INTEGER UNSIGNED REFERENCES code_class.code_class_id,
93
  code_class_name       CHAR(255),
94
  code_class_start_line INTEGER UNSIGNED NOT NULL,
95
  code_class_end_line   INTEGER UNSIGNED NOT NULL,
96
 
97
  INDEX (code_file_id)
98
) ENGINE=InnoDB;
99
 
100
CREATE TABLE IF NOT EXISTS code_method(
101
  code_class_id          INTEGER UNSIGNED NOT NULL REFERENCES code_class.code_class_id,
102
  code_method_id         INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
103
  code_method_name       CHAR(255),
104
  code_method_start_line INTEGER UNSIGNED NOT NULL,
105
  code_method_end_line   INTEGER UNSIGNED NOT NULL,
106
 
107
  INDEX (code_class_id)
108
) ENGINE=InnoDB;
109
 
110
CREATE TABLE IF NOT EXISTS code_line(
111
  code_file_id      INTEGER UNSIGNED NOT NULL REFERENCES code_file.code_file_id,
112
  code_line_id      INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
113
  code_line_number  INTEGER UNSIGNED NOT NULL,
114
  code_line         TEXT,
115
  code_line_covered TINYINT          NOT NULL,
116
 
117
  INDEX (code_file_id)
118
) ENGINE=InnoDB;
119
 
120
CREATE TABLE IF NOT EXISTS code_coverage(
121
  test_id      INTEGER UNSIGNED NOT NULL REFERENCES test.test_id,
122
  code_line_id INTEGER UNSIGNED NOT NULL REFERENCES code_line.code_line_id,
123
 
124
  PRIMARY KEY (test_id, code_line_id)
125
) ENGINE=InnoDB;
126
 
127
CREATE TABLE IF NOT EXISTS metrics_project(
128
  run_id                  INTEGER UNSIGNED NOT NULL,
129
  metrics_project_cls     INTEGER UNSIGNED NOT NULL,
130
  metrics_project_clsa    INTEGER UNSIGNED NOT NULL,
131
  metrics_project_clsc    INTEGER UNSIGNED NOT NULL,
132
  metrics_project_roots   INTEGER UNSIGNED NOT NULL,
133
  metrics_project_leafs   INTEGER UNSIGNED NOT NULL,
134
  metrics_project_interfs INTEGER UNSIGNED NOT NULL,
135
  metrics_project_maxdit  INTEGER UNSIGNED NOT NULL,
136
 
137
  INDEX (run_id)
138
) ENGINE=InnoDB;
139
 
140
CREATE TABLE IF NOT EXISTS metrics_file(
141
  run_id                      INTEGER UNSIGNED NOT NULL,
142
  code_file_id                INTEGER UNSIGNED NOT NULL REFERENCES code_file.code_file_id,
143
  metrics_file_coverage       FLOAT   UNSIGNED NOT NULL,
144
  metrics_file_loc            INTEGER UNSIGNED NOT NULL,
145
  metrics_file_cloc           INTEGER UNSIGNED NOT NULL,
146
  metrics_file_ncloc          INTEGER UNSIGNED NOT NULL,
147
  metrics_file_loc_executable INTEGER UNSIGNED NOT NULL,
148
  metrics_file_loc_executed   INTEGER UNSIGNED NOT NULL,
149
 
150
  INDEX (run_id),
151
  INDEX (code_file_id)
152
) ENGINE=InnoDB;
153
 
154
CREATE TABLE IF NOT EXISTS metrics_function(
155
  run_id                          INTEGER UNSIGNED NOT NULL,
156
  code_function_id                INTEGER UNSIGNED NOT NULL REFERENCES code_method.code_function_id,
157
  metrics_function_coverage       FLOAT   UNSIGNED NOT NULL,
158
  metrics_function_loc            INTEGER UNSIGNED NOT NULL,
159
  metrics_function_loc_executable INTEGER UNSIGNED NOT NULL,
160
  metrics_function_loc_executed   INTEGER UNSIGNED NOT NULL,
161
  metrics_function_ccn            INTEGER UNSIGNED NOT NULL,
162
  metrics_function_crap           FLOAT   UNSIGNED NOT NULL,
163
  metrics_function_npath          INTEGER UNSIGNED NOT NULL,
164
 
165
  INDEX (run_id),
166
  INDEX (code_function_id)
167
) ENGINE=InnoDB;
168
 
169
CREATE TABLE IF NOT EXISTS metrics_class(
170
  run_id                       INTEGER UNSIGNED NOT NULL,
171
  code_class_id                INTEGER UNSIGNED NOT NULL REFERENCES code_class.code_class_id,
172
  metrics_class_coverage       FLOAT   UNSIGNED NOT NULL,
173
  metrics_class_loc            INTEGER UNSIGNED NOT NULL,
174
  metrics_class_loc_executable INTEGER UNSIGNED NOT NULL,
175
  metrics_class_loc_executed   INTEGER UNSIGNED NOT NULL,
176
  metrics_class_aif            FLOAT   UNSIGNED NOT NULL,
177
  metrics_class_ahf            FLOAT   UNSIGNED NOT NULL,
178
  metrics_class_cis            INTEGER UNSIGNED NOT NULL,
179
  metrics_class_csz            INTEGER UNSIGNED NOT NULL,
180
  metrics_class_dit            INTEGER UNSIGNED NOT NULL,
181
  metrics_class_impl           INTEGER UNSIGNED NOT NULL,
182
  metrics_class_mif            FLOAT   UNSIGNED NOT NULL,
183
  metrics_class_mhf            FLOAT   UNSIGNED NOT NULL,
184
  metrics_class_noc            INTEGER UNSIGNED NOT NULL,
185
  metrics_class_pf             FLOAT   UNSIGNED NOT NULL,
186
  metrics_class_vars           INTEGER UNSIGNED NOT NULL,
187
  metrics_class_varsnp         INTEGER UNSIGNED NOT NULL,
188
  metrics_class_varsi          INTEGER UNSIGNED NOT NULL,
189
  metrics_class_wmc            INTEGER UNSIGNED NOT NULL,
190
  metrics_class_wmcnp          INTEGER UNSIGNED NOT NULL,
191
  metrics_class_wmci           INTEGER UNSIGNED NOT NULL,
192
 
193
  INDEX (run_id),
194
  INDEX (code_class_id)
195
) ENGINE=InnoDB;
196
 
197
CREATE TABLE IF NOT EXISTS metrics_method(
198
  run_id                        INTEGER UNSIGNED NOT NULL,
199
  code_method_id                INTEGER UNSIGNED NOT NULL REFERENCES code_method.code_method_id,
200
  metrics_method_coverage       FLOAT   UNSIGNED NOT NULL,
201
  metrics_method_loc            INTEGER UNSIGNED NOT NULL,
202
  metrics_method_loc_executable INTEGER UNSIGNED NOT NULL,
203
  metrics_method_loc_executed   INTEGER UNSIGNED NOT NULL,
204
  metrics_method_ccn            INTEGER UNSIGNED NOT NULL,
205
  metrics_method_crap           FLOAT   UNSIGNED NOT NULL,
206
  metrics_method_npath          INTEGER UNSIGNED NOT NULL,
207
 
208
  INDEX (run_id),
209
  INDEX (code_method_id)
210
) ENGINE=InnoDB;