Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
Add editor_autosave boolean column to user table
Murtaza Nasir08877f996e97
diff --git a/src/init_db.py b/src/init_db.pyindex 81f42c48..435ea3dd 100644--- a/src/init_db.py+++ b/src/init_db.py@@ -294,6 +294,8 @@ def initialize_database(app):# UI/display preferencesif add_column_if_not_exists(engine, 'user', 'show_timestamps_simple_view', 'BOOLEAN DEFAULT 0'):app.logger.info("Added show_timestamps_simple_view column to user table")+ if add_column_if_not_exists(engine, 'user', 'editor_autosave', 'BOOLEAN DEFAULT 0'):+ app.logger.info("Added editor_autosave column to user table")if add_column_if_not_exists(engine, 'tag', 'default_hotwords', 'TEXT'):app.logger.info("Added default_hotwords column to tag table")if add_column_if_not_exists(engine, 'tag', 'default_initial_prompt', 'TEXT'):diff --git a/src/models/user.py b/src/models/user.pyindex 81901efd..3e996faa 100644--- a/src/models/user.py+++ b/src/models/user.py@@ -64,6 +64,7 @@ class User(db.Model, UserMixin):# UI/display preferencesshow_timestamps_simple_view = db.Column(db.Boolean, default=False)+ editor_autosave = db.Column(db.Boolean, default=False)def __repr__(self):return f"User('{self.username}', '{self.email}')"