Files
profilarr/backend/app/db/migrations/versions/002_format_renames.py
santiagosayshey 0729ac0a62 feature: Include Format when Renaming (#143)
- 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
2025-02-18 01:49:38 +10:30

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()