-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sql
More file actions
147 lines (143 loc) · 6.96 KB
/
Copy pathinit.sql
File metadata and controls
147 lines (143 loc) · 6.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
CREATE TABLE `charges` (
`charge_id` smallint NOT NULL AUTO_INCREMENT,
`chapter_id` smallint DEFAULT NULL,
`title_id` smallint DEFAULT '0',
`name` varchar(100) DEFAULT NULL,
`mgl_code` varchar(45) DEFAULT NULL,
`chapter` varchar(10) DEFAULT '0',
`description` varchar(250) DEFAULT NULL,
`severity` tinyint DEFAULT '0',
`type` enum('drug','vehicle','person','sexual','property','public_order','weapons','other') DEFAULT NULL,
`degree` enum('None','Misd.','Felony') DEFAULT 'None',
`hoc_min` varchar(45) DEFAULT NULL,
`hoc_max` varchar(45) DEFAULT NULL,
`sp_min` varchar(45) DEFAULT NULL,
`sp_max` varchar(45) DEFAULT NULL,
`total_cases` mediumint unsigned DEFAULT NULL,
PRIMARY KEY (`charge_id`),
UNIQUE KEY `id_UNIQUE` (`charge_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4782 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
CREATE TABLE `judges` (
`judge_id` int unsigned NOT NULL AUTO_INCREMENT,
`first` varchar(25) DEFAULT NULL,
`middle` varchar(10) DEFAULT NULL,
`last` varchar(25) DEFAULT NULL,
`total_cases` mediumint unsigned DEFAULT NULL,
PRIMARY KEY (`judge_id`),
UNIQUE KEY `judge_id_UNIQUE` (`judge_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4166 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
CREATE TABLE `motion_data` (
`specification_id` int unsigned NOT NULL,
`motion_id` enum('dismiss','suppress','bill of particulars','discovery','speedy','bail','dangerousness','amend charge','continue','funds','protect','uncharged conduct','sequester','nolle prosequi','withdraw','obtain','travel','third party records','virtual','record-seal','record-medical','record-criminal','other') NOT NULL,
`party` enum('defendant','commonwealth','probation','victim','non-party','surety','both parties') NOT NULL,
`accepted` mediumint unsigned DEFAULT NULL,
`denied` mediumint unsigned DEFAULT NULL,
`no_action` mediumint unsigned DEFAULT NULL,
`advisement` mediumint unsigned DEFAULT NULL,
`unknown` mediumint unsigned DEFAULT NULL,
PRIMARY KEY (`specification_id`,`motion_id`,`party`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
CREATE TABLE `specification` (
`specification_id` int unsigned NOT NULL AUTO_INCREMENT,
`judge_id` smallint unsigned NOT NULL,
`charge_id` smallint unsigned NOT NULL,
`court_id` smallint unsigned NOT NULL,
`trial_category` enum('no_trial','jury_trial','bench_trial','any') NOT NULL,
`total_case_dispositions` int unsigned DEFAULT '0',
`total_charges` int unsigned DEFAULT '0',
`total_charges_disposed` int unsigned DEFAULT '0',
`aquittals` mediumint unsigned DEFAULT '0',
`dismissals` mediumint unsigned DEFAULT '0',
`not_responsible` mediumint unsigned DEFAULT '0',
`nolle_prosequis` mediumint unsigned DEFAULT '0',
`cwof` mediumint unsigned DEFAULT '0',
`responsible` mediumint unsigned DEFAULT '0',
`guilty_plea` mediumint unsigned DEFAULT '0',
`guilty` mediumint unsigned DEFAULT '0',
`other` mediumint unsigned DEFAULT '0',
`fee_count` mediumint unsigned DEFAULT '0',
`total_fee` mediumint unsigned DEFAULT '0',
`fee_50` mediumint unsigned DEFAULT '0',
`fee_100` mediumint unsigned DEFAULT '0',
`fee_200` mediumint unsigned DEFAULT '0',
`fee_300` mediumint unsigned DEFAULT '0',
`fee_500` mediumint unsigned DEFAULT '0',
`fee_1000` mediumint unsigned DEFAULT '0',
`fee_2000` smallint unsigned DEFAULT '0',
`fee_3000` smallint unsigned DEFAULT '0',
`fee_4000` smallint unsigned DEFAULT '0',
`fee_5000` smallint unsigned DEFAULT '0',
`fee_5000_plus` smallint unsigned DEFAULT '0',
`hoc_count` mediumint unsigned DEFAULT '0',
`total_hoc_days` int unsigned DEFAULT '0',
`hoc_1` mediumint unsigned DEFAULT '0',
`hoc_2` mediumint unsigned DEFAULT '0',
`hoc_3` mediumint unsigned DEFAULT '0',
`hoc_4` mediumint unsigned DEFAULT '0',
`hoc_6` mediumint unsigned DEFAULT '0',
`hoc_8` mediumint unsigned DEFAULT '0',
`hoc_10` smallint unsigned DEFAULT '0',
`hoc_12` smallint unsigned DEFAULT '0',
`hoc_15` smallint unsigned DEFAULT '0',
`hoc_18` smallint unsigned DEFAULT '0',
`hoc_21` smallint unsigned DEFAULT '0',
`hoc_24` smallint unsigned DEFAULT '0',
`hoc_24_plus` smallint unsigned DEFAULT '0',
`probation_count` mediumint unsigned DEFAULT '0',
`total_probation_days` int unsigned DEFAULT '0',
`probation_1` mediumint unsigned DEFAULT '0',
`probation_2` mediumint unsigned DEFAULT '0',
`probation_3` mediumint unsigned DEFAULT '0',
`probation_4` mediumint unsigned DEFAULT '0',
`probation_6` mediumint unsigned DEFAULT '0',
`probation_8` mediumint unsigned DEFAULT '0',
`probation_10` smallint unsigned DEFAULT '0',
`probation_12` smallint unsigned DEFAULT '0',
`probation_15` smallint unsigned DEFAULT '0',
`probation_18` smallint unsigned DEFAULT '0',
`probation_21` smallint unsigned DEFAULT '0',
`probation_24` smallint unsigned DEFAULT '0',
`probation_24_plus` smallint unsigned DEFAULT '0',
`license_lost_count` mediumint unsigned DEFAULT '0',
`total_license_lost_days` int unsigned DEFAULT '0',
`license_lost_1` mediumint unsigned DEFAULT '0',
`license_lost_2` mediumint unsigned DEFAULT '0',
`license_lost_3` mediumint unsigned DEFAULT '0',
`license_lost_4` mediumint unsigned DEFAULT '0',
`license_lost_6` mediumint unsigned DEFAULT '0',
`license_lost_8` mediumint unsigned DEFAULT '0',
`license_lost_10` mediumint unsigned DEFAULT '0',
`license_lost_12` smallint unsigned DEFAULT '0',
`license_lost_15` smallint unsigned DEFAULT '0',
`license_lost_18` smallint unsigned DEFAULT '0',
`license_lost_21` smallint unsigned DEFAULT '0',
`license_lost_24` smallint unsigned DEFAULT '0',
`license_lost_24_plus` smallint unsigned DEFAULT '0',
`total_bail_decisions` int unsigned DEFAULT '0',
`free_bail` mediumint unsigned DEFAULT '0',
`cost_bail` mediumint unsigned DEFAULT '0',
`total_bail_cost` bigint unsigned DEFAULT '0',
`denied_bail` mediumint unsigned DEFAULT '0',
`bail_500` mediumint unsigned DEFAULT '0',
`bail_1000` mediumint unsigned DEFAULT '0',
`bail_2000` mediumint unsigned DEFAULT '0',
`bail_3000` mediumint unsigned DEFAULT '0',
`bail_5000` mediumint unsigned DEFAULT '0',
`bail_10000` mediumint unsigned DEFAULT '0',
`bail_15000` smallint unsigned DEFAULT '0',
`bail_20000` smallint unsigned DEFAULT '0',
`bail_30000` smallint unsigned DEFAULT '0',
`bail_40000` smallint unsigned DEFAULT '0',
`bail_50000` smallint unsigned DEFAULT '0',
`bail_50000_plus` smallint unsigned DEFAULT '0',
PRIMARY KEY (`specification_id`,`judge_id`,`charge_id`,`court_id`,`trial_category`),
UNIQUE KEY `specification_id_UNIQUE` (`specification_id`),
UNIQUE KEY `specification_keys_UNIQUE` (`judge_id`,`charge_id`,`court_id`,`trial_category`)
) ENGINE=InnoDB AUTO_INCREMENT=1063748 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
CREATE TABLE `users` (
`id` smallint NOT NULL AUTO_INCREMENT,
`email` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;