mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -05:00
We want to have new permissions which will be used specifically for broadcasts: - `create_broadcasts` - `approve_broadcasts` - `reject_broadcasts` - `cancel_broadcasts` Cancel and reject will always go together, but having separate database permissions makes things easier to change in the future. The permission column of the permissions table is an enum. We can add values in the alembic upgrade script, but removing individual values from an enum is not supported by Postgres. To remove values, we have to recreate the enum with the old values.
See https://flask-alembic.readthedocs.io/en/stable/.
You can run flask db for a list of the available commands.
Note that we manually rename the auto-generated files so the prefix is a sequential number instead of a SHA. This means the files are listed in order, so it's easier to navigate the migration history.