mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-21 18:12:04 -05:00
Set crown if organisation_type is updated on service.
Add some tests. Update the initial values of crown.
This commit is contained in:
@@ -19,6 +19,10 @@ def upgrade():
|
||||
update services set crown = True
|
||||
where organisation_type = 'central'
|
||||
""")
|
||||
op.execute("""
|
||||
update services set crown = True
|
||||
where organisation_type is null
|
||||
""")
|
||||
op.execute("""
|
||||
update services set crown = False
|
||||
where crown is null
|
||||
@@ -30,6 +34,10 @@ def upgrade():
|
||||
update services_history set crown = True
|
||||
where organisation_type = 'central'
|
||||
""")
|
||||
op.execute("""
|
||||
update services_history set crown = True
|
||||
where organisation_type is null
|
||||
""")
|
||||
op.execute("""
|
||||
update services_history set crown = False
|
||||
where crown is null
|
||||
|
||||
Reference in New Issue
Block a user