Skip to content

Commit

Permalink
Update DB Models
Browse files Browse the repository at this point in the history
- Add suffix to officer names
- Add type and subtype to allegations
- Add record ID to allegation and complaint
- Allow for multiple agencies with the same name
  • Loading branch information
DMalone87 committed Sep 28, 2024
1 parent e58bc06 commit be3fc45
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
5 changes: 0 additions & 5 deletions backend/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,6 @@ def NEO4J_BOLT_URI(self):
def MIXPANEL_TOKEN(self):
return os.environ.get("MIXPANEL_TOKEN", None)

SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHEMY_ECHO = False

FLASK_DB_SEEDS_PATH = "alembic/seeds.py"


class DevelopmentConfig(Config):
ENV = "development"
Expand Down
2 changes: 1 addition & 1 deletion backend/database/models/agency.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __repr__(self):

class Agency(StructuredNode, JsonSerializable):
uid = UniqueIdProperty()
name = StringProperty(unique_index=True)
name = StringProperty()
website_url = StringProperty()
hq_address = StringProperty()
hq_city = StringProperty()
Expand Down
4 changes: 4 additions & 0 deletions backend/database/models/complaint.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class GovernmentSourceRel(BaseSourceRel):

class Complaint(StructuredNode, JsonSerializable):
uid = UniqueIdProperty()
record_id = StringProperty()
category = StringProperty()
incident_date = DateProperty()
recieved_date = DateProperty()
Expand All @@ -75,7 +76,10 @@ def __repr__(self):

class Allegation(StructuredNode):
uid = UniqueIdProperty()
record_id = StringProperty()
allegation = StringProperty()
type = StringProperty()
subsype = StringProperty()
recommended_finding = StringProperty()
recommended_outcome = StringProperty()
finding = StringProperty()
Expand Down
1 change: 1 addition & 0 deletions backend/database/models/officer.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class Officer(StructuredNode, JsonSerializable):
first_name = StringProperty()
middle_name = StringProperty()
last_name = StringProperty()
suffix = StringProperty()
race = StringProperty()
ethnicity = StringProperty()
gender = StringProperty()
Expand Down

0 comments on commit be3fc45

Please sign in to comment.