mirror of
https://github.com/flibusta-apps/telegram_files_cache_server.git
synced 2025-12-06 14:45:36 +01:00
Init
This commit is contained in:
35
src/app/alembic/versions/9b7cfb422191_.py
Normal file
35
src/app/alembic/versions/9b7cfb422191_.py
Normal file
@@ -0,0 +1,35 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 9b7cfb422191
|
||||
Revises:
|
||||
Create Date: 2021-11-21 14:09:17.478532
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '9b7cfb422191'
|
||||
down_revision = None
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('cached_files',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('object_id', sa.Integer(), nullable=False),
|
||||
sa.Column('object_type', sa.String(length=8), nullable=False),
|
||||
sa.Column('data', sa.JSON(), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('object_id', 'object_type', name='uc_cached_files_object_id_object_type')
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table('cached_files')
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user