-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 🩹 Default Live TV checkbox to enabled to reflect Jellyfin/Emby d…
…efault
- Loading branch information
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
apps/wizarr-backend/wizarr_backend/app/migrator/migrations/2024-04-22_19-17-37.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# | ||
# CREATED ON VERSION: V4.0.0b7 | ||
# MIGRATION: 2024-04-19_18-46-37 | ||
# CREATED: Fri Apr 19 2024 | ||
# | ||
|
||
from peewee import * | ||
from playhouse.migrate import * | ||
|
||
from app import db | ||
|
||
# Do not change the name of this file, | ||
# migrations are run in order of their filenames date and time | ||
|
||
|
||
def run(): | ||
# Use migrator to perform actions on the database | ||
migrator = SqliteMigrator(db) | ||
|
||
# Add new Column to users table called tutorial, its a boolean field with a default value of False | ||
with db.transaction(): | ||
# Check if the column exists | ||
cursor = db.cursor() | ||
cursor.execute("PRAGMA table_info(invitations);") | ||
columns = cursor.fetchall() | ||
column_names = [column[1] for column in columns] | ||
|
||
if "live_tv" not in column_names: | ||
db.execute_sql("ALTER TABLE invitations ADD COLUMN live_tv INTEGER") | ||
else: | ||
print("Column live_tv already exists") | ||
|
||
print("Migration 2024-04-22_19-17-37 complete") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters