mirror of
https://github.com/Dictionarry-Hub/profilarr.git
synced 2026-01-24 03:31:12 +01:00
- New: Field inside format general tab to enable include format in rename - New: Database migration that adds format renames table - New: Queries to get / update rename status for a format - Update: Format compiler checks for rename entries and add include rename field when found - Update: Parsing improvements for incoming commit messages
24 lines
574 B
Python
24 lines
574 B
Python
# backend/app/db/migrations/versions/002_format_renames.py
|
|
from ...connection import get_db
|
|
|
|
version = 2
|
|
name = "format_renames"
|
|
|
|
|
|
def up():
|
|
"""Add table for tracking which formats to include in renames"""
|
|
with get_db() as conn:
|
|
conn.execute('''
|
|
CREATE TABLE IF NOT EXISTS format_renames (
|
|
format_name TEXT PRIMARY KEY NOT NULL
|
|
)
|
|
''')
|
|
conn.commit()
|
|
|
|
|
|
def down():
|
|
"""Remove the format_renames table"""
|
|
with get_db() as conn:
|
|
conn.execute('DROP TABLE IF EXISTS format_renames')
|
|
conn.commit()
|