diff --git a/app/config.py b/app/config.py index 42522ae17..61feb6ae7 100644 --- a/app/config.py +++ b/app/config.py @@ -364,7 +364,7 @@ class Production(Config): f"notify-api-csv-upload-bucket-{Config.NOTIFY_ENVIRONMENT}" ) - FROM_NUMBER = "US Notify" + FROM_NUMBER = "Notify.gov" CRONITOR_ENABLED = True diff --git a/migrations/versions/0409_fix_service_name.py b/migrations/versions/0409_fix_service_name.py new file mode 100644 index 000000000..04c6ba359 --- /dev/null +++ b/migrations/versions/0409_fix_service_name.py @@ -0,0 +1,43 @@ +""" + +Revision ID: 0409_fix_service_name +Revises: 0408_fix_timezone_again +Create Date: 2023-12-13 11:38:01.314057 + +""" +from sqlalchemy import text + +revision = "0409_fix_service_name" +down_revision = "0408_fix_timezone_again" + +from alembic import op +from flask import current_app + +service_id = current_app.config["NOTIFY_SERVICE_ID"] + + +def upgrade(): + conn = op.get_bind() + + # modify name of default service user in services + # table_name = 'services' + # col = 'name' + # val = 'Notify.gov' + # select_by_col = 'id' + # select_by_val = service_id + input_params = {"service_id": service_id} + conn.execute( + text("update services set name='Notify.gov' where id =:service_id"), input_params + ) + + # table_name = 'services_history' + conn.execute( + text("update services_history set name='Notify.gov' where id =:service_id"), + input_params, + ) + + +def downgrade(): + ### commands auto generated by Alembic - please adjust! ### + pass + ### end Alembic commands ###