more files

This commit is contained in:
Kenneth Kehl
2023-07-17 11:29:08 -07:00
parent 56ea2464e4
commit cefb8a281f
11 changed files with 158 additions and 71 deletions

View File

@@ -7,6 +7,8 @@ Create Date: 2017-06-05 16:15:17.744908
"""
# revision identifiers, used by Alembic.
from sqlalchemy import text
revision = '0099_tfl_dar'
down_revision = '0098_service_inbound_api'
@@ -18,15 +20,23 @@ TFL_DAR_ID = '1d70f564-919b-4c68-8bdf-b8520d92516e'
def upgrade():
op.execute("""INSERT INTO organisation VALUES (
'{}',
conn = op.get_bind()
input_params = {
"tfl_dar_id": TFL_DAR_ID
}
conn.execute(text("""INSERT INTO organisation VALUES (
:tfl_dar_id,
'',
'tfl_dar_x2.png',
'tfl'
)""".format(TFL_DAR_ID))
)"""), input_params)
def downgrade():
op.execute("""
DELETE FROM organisation WHERE "id" = '{}'
""".format(TFL_DAR_ID))
conn = op.get_bind()
input_params = {
"tfl_dar_id": TFL_DAR_ID
}
conn.execute(text("""
DELETE FROM organisation WHERE "id" = :tfl_dar_id
"""), input_params)