mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-04 05:39:57 -05:00
Setting FileGroup.censored when refreshing channel files.
This commit is contained in:
parent
1fbfb990f1
commit
0fd545d2e8
5 changed files with 62 additions and 13 deletions
33
alembic/versions/00f11f309c53_filegroup_censored.py
Normal file
33
alembic/versions/00f11f309c53_filegroup_censored.py
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
"""FileGroup.censored
|
||||
|
||||
Revision ID: 00f11f309c53
|
||||
Revises: 1c041aeee0fc
|
||||
Create Date: 2024-06-17 14:02:09.881477
|
||||
|
||||
"""
|
||||
import os
|
||||
|
||||
from alembic import op
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '00f11f309c53'
|
||||
down_revision = '1c041aeee0fc'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
DOCKERIZED = True if os.environ.get('DOCKER', '').lower().startswith('t') else False
|
||||
|
||||
|
||||
def upgrade():
|
||||
bind = op.get_bind()
|
||||
session = Session(bind=bind)
|
||||
|
||||
session.execute('ALTER TABLE file_group ADD COLUMN censored BOOLEAN DEFAULT FALSE')
|
||||
|
||||
|
||||
def downgrade():
|
||||
bind = op.get_bind()
|
||||
session = Session(bind=bind)
|
||||
|
||||
session.execute('ALTER TABLE file_group DROP COLUMN IF EXISTS censored')
|
||||
Loading…
Add table
Add a link
Reference in a new issue