From 4ea3a099b05fa910498bfbf1b2d7387118355472 Mon Sep 17 00:00:00 2001 From: "Ole Mathias Aa. Heggem" Date: Sun, 13 Apr 2025 07:18:45 +0200 Subject: Upgrade bootstrap and rewrite API (#230) --- api/app/alembic/versions/106dece647f0_add_oplog.py | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 api/app/alembic/versions/106dece647f0_add_oplog.py (limited to 'api/app/alembic/versions/106dece647f0_add_oplog.py') diff --git a/api/app/alembic/versions/106dece647f0_add_oplog.py b/api/app/alembic/versions/106dece647f0_add_oplog.py new file mode 100644 index 0000000..ad397ae --- /dev/null +++ b/api/app/alembic/versions/106dece647f0_add_oplog.py @@ -0,0 +1,36 @@ +"""Add oplog + +Revision ID: 106dece647f0 +Revises: +Create Date: 2025-04-11 17:16:18.611889 + +""" +from alembic import op +import sqlalchemy as sa +import sqlmodel.sql.sqltypes + + +# revision identifiers, used by Alembic. +revision = '106dece647f0' +down_revision = None +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.create_table('oplog', + sa.Column('id', sa.Integer(), nullable=False), + sa.Column('time', sa.Integer(), nullable=False), + sa.Column('username', sqlmodel.sql.sqltypes.AutoString(), nullable=True), + sa.Column('systems', sqlmodel.sql.sqltypes.AutoString(), nullable=True), + sa.Column('message', sqlmodel.sql.sqltypes.AutoString(), nullable=False), + sa.PrimaryKeyConstraint('id') + ) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_table('oplog') + # ### end Alembic commands ### \ No newline at end of file -- cgit v1.2.3