diff options
author | Ole Mathias Aa. Heggem <olemathias.aa.heggem@gmail.com> | 2025-04-13 07:18:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-13 07:18:45 +0200 |
commit | 4ea3a099b05fa910498bfbf1b2d7387118355472 (patch) | |
tree | c248cf6764412471ee3e0d1218761bee19fb396a /api/app/alembic/versions/106dece647f0_add_oplog.py | |
parent | 09710c061d5b8ae86b3dfe49f4b8936c13a10535 (diff) |
Diffstat (limited to 'api/app/alembic/versions/106dece647f0_add_oplog.py')
-rw-r--r-- | api/app/alembic/versions/106dece647f0_add_oplog.py | 36 |
1 files changed, 36 insertions, 0 deletions
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 |