Iniital release of DosVault.
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
"""add local image path fields
|
||||
|
||||
Revision ID: 3e8f92662c04
|
||||
Revises: 002
|
||||
Create Date: 2025-09-06 01:18:21.497321
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sys
|
||||
from pathlib import Path
|
||||
sys.path.append(str(Path(__file__).parent.parent.parent / 'src'))
|
||||
from libs.database import PathType
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '3e8f92662c04'
|
||||
down_revision = '002'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('metadata', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('cover_image_path', PathType(), nullable=True))
|
||||
batch_op.add_column(sa.Column('screenshot_path', PathType(), nullable=True))
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('metadata', schema=None) as batch_op:
|
||||
batch_op.drop_column('screenshot_path')
|
||||
batch_op.drop_column('cover_image_path')
|
||||
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user