1. Simplify the exposed api to reduce race conditions which could occur if we allowed flow details, task details and log books to be deleted at different times; reduce this down to just being able to save and delete from logbooks (and only save/update for flow and task details to) to reduce the problem cases. 2. Introduce a alembic migration with a proper schema so that the initial database can be created in the first place, adjust its exposed fields and relations to be defined by said schema. 3. Use oslo db models instead of our own. Change-Id: I78bbedf87d506d3f39157198638937c933235b7b
23 lines
412 B
Mako
23 lines
412 B
Mako
"""${message}
|
|
|
|
Revision ID: ${up_revision}
|
|
Revises: ${down_revision}
|
|
Create Date: ${create_date}
|
|
|
|
"""
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = ${repr(up_revision)}
|
|
down_revision = ${repr(down_revision)}
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
${imports if imports else ""}
|
|
|
|
def upgrade():
|
|
${upgrades if upgrades else "pass"}
|
|
|
|
|
|
def downgrade():
|
|
${downgrades if downgrades else "pass"}
|
|
|