mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
move sqlalchemy defaults from booleans to SQL constructs
booleans aren't actually allowed, and quietly do nothing also default Services.active to true
This commit is contained in:
23
migrations/versions/0059_set_services_to_active.py
Normal file
23
migrations/versions/0059_set_services_to_active.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
we weren't previously using the services.active column , and by default it was set to false. lets set all services to
|
||||
active, so that in the future we can turn it off to signify deactivating a service
|
||||
|
||||
Revision ID: 0059_set_services_to_active
|
||||
Revises: 0058_add_letters_flag
|
||||
Create Date: 2016-10-31 15:17:16.716450
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '0059_set_services_to_active'
|
||||
down_revision = '0058_add_letters_flag'
|
||||
|
||||
from alembic import op
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.execute('UPDATE services SET active = TRUE')
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.execute('UPDATE services SET active = FALSE')
|
||||
Reference in New Issue
Block a user