Commit 9a7cc83 1 parent 2f60c0b commit 9a7cc83 Copy full SHA for 9a7cc83
File tree 2 files changed +56
-0
lines changed
2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Generated by Django 4.2.11 on 2024-06-17 14:00
2
+
3
+ from django .db import migrations , models
4
+ import django .db .models .deletion
5
+
6
+
7
+ class Migration (migrations .Migration ):
8
+
9
+ dependencies = [
10
+ ("crowdsourcer" , "0050_add_previous_q_link" ),
11
+ ]
12
+
13
+ operations = [
14
+ migrations .CreateModel (
15
+ name = "AuthorityData" ,
16
+ fields = [
17
+ (
18
+ "id" ,
19
+ models .BigAutoField (
20
+ auto_created = True ,
21
+ primary_key = True ,
22
+ serialize = False ,
23
+ verbose_name = "ID" ,
24
+ ),
25
+ ),
26
+ ("data_name" , models .CharField (max_length = 200 )),
27
+ ("data_value" , models .TextField ()),
28
+ (
29
+ "authority" ,
30
+ models .ForeignKey (
31
+ on_delete = django .db .models .deletion .CASCADE ,
32
+ to = "crowdsourcer.publicauthority" ,
33
+ ),
34
+ ),
35
+ ],
36
+ options = {
37
+ "indexes" : [
38
+ models .Index (
39
+ fields = ["authority" , "data_name" ],
40
+ name = "crowdsource_authori_49003f_idx" ,
41
+ )
42
+ ],
43
+ },
44
+ ),
45
+ ]
Original file line number Diff line number Diff line change @@ -104,6 +104,17 @@ def options(self):
104
104
return Option .objects .filter (question = self ).order_by ("ordering" , "score" )
105
105
106
106
107
+ class AuthorityData (models .Model ):
108
+ authority = models .ForeignKey ("PublicAuthority" , on_delete = models .CASCADE )
109
+ data_name = models .CharField (max_length = 200 )
110
+ data_value = models .TextField ()
111
+
112
+ class Meta :
113
+ indexes = [
114
+ models .Index (fields = ["authority" , "data_name" ]),
115
+ ]
116
+
117
+
107
118
class PublicAuthority (models .Model ):
108
119
COUNTRIES = [
109
120
("england" , "England" ),
You can’t perform that action at this time.
0 commit comments