mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-25 01:16:18 -05:00
Bumping version for new feature.
Skipping video epoch test on circleci. Created script which finds and cleans up (renames/deletes) orphaned video meta files. Reworking orphaned video query, some video files were leaking through. Modifying File table to allow finding of orphaned video files. Extracting epoch from video info_json for more accurate upload_date. Extracting epoch from video info_json for more accurate upload_date.
This commit is contained in:
parent
b216a9c678
commit
d0d69519cd
10 changed files with 347 additions and 30 deletions
43
alembic/versions/6489cd50c889_file_stem_and_directory.py
Normal file
43
alembic/versions/6489cd50c889_file_stem_and_directory.py
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
"""File stem and directory
|
||||
|
||||
Revision ID: 6489cd50c889
|
||||
Revises: 13542a230c78
|
||||
Create Date: 2022-12-04 15:39:55.485355
|
||||
|
||||
"""
|
||||
import os
|
||||
|
||||
from alembic import op
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '6489cd50c889'
|
||||
down_revision = '13542a230c78'
|
||||
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 ADD COLUMN directory TEXT')
|
||||
session.execute('ALTER TABLE file ADD COLUMN full_stem TEXT')
|
||||
session.execute('ALTER TABLE file ADD COLUMN stem TEXT')
|
||||
session.execute('CREATE INDEX file_directory_idx ON file(directory)')
|
||||
session.execute('CREATE INDEX file_full_stem_idx ON file(full_stem)')
|
||||
session.execute('CREATE INDEX file_stem_idx ON file(stem)')
|
||||
|
||||
|
||||
def downgrade():
|
||||
bind = op.get_bind()
|
||||
session = Session(bind=bind)
|
||||
|
||||
session.execute('DROP INDEX IF EXISTS file_directory_idx')
|
||||
session.execute('DROP INDEX IF EXISTS file_full_stem_idx')
|
||||
session.execute('DROP INDEX IF EXISTS file_stem_idx')
|
||||
session.execute('ALTER TABLE file DROP COLUMN IF EXISTS directory')
|
||||
session.execute('ALTER TABLE file DROP COLUMN IF EXISTS full_stem')
|
||||
session.execute('ALTER TABLE file DROP COLUMN IF EXISTS stem')
|
||||
Loading…
Add table
Add a link
Reference in a new issue