mirror of
https://github.com/GSA/notifications-api.git
synced 2026-04-26 04:10:13 -04:00
This deletes a big ol' chunk of code related to letters. It's not everything—there are still a few things that might be tied to sms/email—but it's the the heart of letters function. SMS and email function should be untouched by this. Areas affected: - Things obviously about letters - PDF tasks, used for precompiling letters - Virus scanning, used for those PDFs - FTP, used to send letters to the printer - Postage stuff
37 lines
811 B
Python
37 lines
811 B
Python
"""
|
|
|
|
Revision ID: 0317_uploads_for_all
|
|
Revises: 0316_int_letters_permission
|
|
Create Date: 2019-05-13 10:44:51.867661
|
|
|
|
"""
|
|
from alembic import op
|
|
|
|
|
|
revision = '0317_uploads_for_all'
|
|
down_revision = '0316_int_letters_permission'
|
|
|
|
|
|
def upgrade():
|
|
op.execute("""
|
|
INSERT INTO
|
|
service_permissions (service_id, permission, created_at)
|
|
SELECT
|
|
id, 'upload_letters', now()
|
|
FROM
|
|
services
|
|
WHERE
|
|
NOT EXISTS (
|
|
SELECT
|
|
FROM
|
|
service_permissions
|
|
WHERE
|
|
service_id = services.id and
|
|
permission = 'upload_letters'
|
|
)
|
|
""")
|
|
|
|
|
|
def downgrade():
|
|
op.execute("DELETE from service_permissions where permission = 'upload_letters'")
|