From 2fee8006652d9715bc5f67a3a23974f40f8986f9 Mon Sep 17 00:00:00 2001 From: inter Date: Mon, 8 Sep 2025 16:35:40 +0800 Subject: [PATCH] Add File --- backend/alembic/versions/028_ds_oid.py | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 backend/alembic/versions/028_ds_oid.py diff --git a/backend/alembic/versions/028_ds_oid.py b/backend/alembic/versions/028_ds_oid.py new file mode 100644 index 0000000..83afde5 --- /dev/null +++ b/backend/alembic/versions/028_ds_oid.py @@ -0,0 +1,28 @@ +"""028_ds_oid + +Revision ID: e96b16d3daab +Revises: b049c9f8ca5b +Create Date: 2025-07-17 14:40:48.522033 + +""" +import sqlalchemy as sa +from alembic import op + +# revision identifiers, used by Alembic. +revision = 'e96b16d3daab' +down_revision = 'b049c9f8ca5b' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.add_column('core_datasource', sa.Column('oid', sa.BigInteger(), nullable=True)) + op.execute('update core_datasource set oid = 1') + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_column('core_datasource', 'oid') + # ### end Alembic commands ###