diff --git a/.vscode/settings.json b/.vscode/settings.json index 4969628a3..fd3d54897 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -28,4 +28,5 @@ "[shellscript]": { "editor.defaultFormatter": "shakram02.bash-beautify" }, + "conventionalCommits.gitmoji": false, } \ No newline at end of file diff --git a/apps/wizarr-backend/wizarr_backend/app/migrator/migrations/2024-04-22_19-17-37.py b/apps/wizarr-backend/wizarr_backend/app/migrator/migrations/2024-04-22_19-17-37.py new file mode 100644 index 000000000..763f08c4a --- /dev/null +++ b/apps/wizarr-backend/wizarr_backend/app/migrator/migrations/2024-04-22_19-17-37.py @@ -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") diff --git a/apps/wizarr-frontend/src/modules/admin/components/Forms/InvitationForm.vue b/apps/wizarr-frontend/src/modules/admin/components/Forms/InvitationForm.vue index 73cedebd5..c384e1285 100644 --- a/apps/wizarr-frontend/src/modules/admin/components/Forms/InvitationForm.vue +++ b/apps/wizarr-frontend/src/modules/admin/components/Forms/InvitationForm.vue @@ -107,7 +107,7 @@ export default defineComponent({ inviteCode: "", expiration: 1440 as number | null | "custom", customExpiration: "" as string, - checkboxes: [] as string[], + checkboxes: ["live_tv"] as string[], // Add the checkboxes you want to be checked by default duration: "unlimited" as number | "unlimited" | "custom", customDuration: "" as string, libraries: [] as string[],