~coughphp/coughphp/2.0

« back to all changes in this revision

Viewing changes to tests/dal/db_setup.sql

  • Committer: Anthony Bush
  • Date: 2008-08-23 03:35:08 UTC
  • mfrom: (262.1.18 coughphp-release-1.3)
  • Revision ID: anthony@anthonybush.com-20080823033508-uy4yn5pmio6wcetv
Accept release-1.3 branch changes into trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
 
3
1
 
4
2
DROP TABLE IF EXISTS `person`;
5
3
CREATE TABLE `person` (
27
10
  KEY `name` (`name`)
28
11
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ;
29
12
 
30
 
 
31
13
INSERT INTO `person` (`person_id`, `name`, `is_retired`, `political_party_id`) VALUES (1, 'Anthony', 0, 2),
32
14
(2, 'Lewis', 0, 2),
33
15
(3, 'Tom', 0, 99);
34
16
 
35
17
-- --------------------------------------------------------
36
18
 
37
 
 
38
19
DROP TABLE IF EXISTS `person2school`;
39
20
CREATE TABLE `person2school` (
40
21
  `person2school_id` int(11) NOT NULL auto_increment,
55
30
  KEY `person_id` (`person_id`)
56
31
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
57
32
 
58
 
 
59
33
INSERT INTO `person2school` (`person2school_id`, `school_id`, `person_id`, `person2school_type_id`, `relationship_start_date`, `relationship_end_date`, `is_retired`) VALUES (1, 1, 1, 1, '2007-02-19 02:02:59', '2007-02-19 02:02:59', 1),
60
34
(2, 1, 1, 1, '2007-02-19 02:07:14', '2007-02-19 02:07:14', 1),
61
35
(3, 1, 1, 1, '2007-02-19 02:40:06', '2007-02-19 02:40:06', 0);
62
36
 
63
37
-- --------------------------------------------------------
64
38
 
65
 
 
66
39
DROP TABLE IF EXISTS `person2school_type`;
67
40
CREATE TABLE `person2school_type` (
68
41
  `person2school_type_id` int(11) NOT NULL auto_increment,
76
43
  PRIMARY KEY  (`person2school_type_id`)
77
44
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;
78
45
 
79
 
 
80
46
INSERT INTO `person2school_type` (`person2school_type_id`, `name`) VALUES (1, 'Student'),
81
47
(3, 'Professor'),
82
48
(5, 'TA');
83
49
 
84
50
-- --------------------------------------------------------
85
51
 
86
 
 
87
52
DROP TABLE IF EXISTS `political_party`;
88
53
CREATE TABLE `political_party` (
89
54
  `political_party_id` int(11) NOT NULL auto_increment,
99
58
  KEY `name` (`name`)
100
59
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
101
60
 
102
 
 
103
61
INSERT INTO `political_party` (`political_party_id`, `name`, `is_retired`) VALUES (1, 'Democratic', 0),
104
62
(2, 'Republican', 0),
105
63
(3, 'Libertarian', 0),
110
65
 
111
66
-- --------------------------------------------------------
112
67
 
113
 
 
114
68
DROP TABLE IF EXISTS `school`;
115
69
CREATE TABLE `school` (
116
70
  `school_id` int(11) NOT NULL auto_increment,
125
76
  KEY `name` (`name`)
126
77
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
127
78
 
128
 
 
129
79
INSERT INTO `school` (`school_id`, `name`, `short_name`, `school_type_id`, `is_retired`) VALUES (1, 'Texas Tech University', 'TTU', 3, 0),
130
80
(2, 'University of Texas', 'UT', 3, 0),
131
81
(3, 'Austin Community College', 'ACC', 1, 0),
136
83
 
137
84
-- --------------------------------------------------------
138
85
 
139
 
 
140
86
DROP TABLE IF EXISTS `school_type`;
141
87
CREATE TABLE `school_type` (
142
88
  `school_type_id` int(11) NOT NULL auto_increment,
147
90
  PRIMARY KEY  (`school_type_id`)
148
91
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
149
92
 
150
 
 
151
93
INSERT INTO `school_type` (`school_type_id`, `name`) VALUES (1, 'College'),
152
94
(3, 'University');
153
95
 
154
96
-- --------------------------------------------------------
155
97
 
156
 
 
157
98
DROP TABLE IF EXISTS `school_type_empty_table`;
158
99
CREATE TABLE `school_type_empty_table` (
159
100
  `school_type_id` int(11) NOT NULL auto_increment,