Fix DB model.
This commit is contained in:
7
migrations/remove_email_preferences.sql
Normal file
7
migrations/remove_email_preferences.sql
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
-- Remove all email preference columns from user_preferences table
|
||||||
|
-- These columns were not being used and are being removed to clean up the schema
|
||||||
|
|
||||||
|
ALTER TABLE user_preferences
|
||||||
|
DROP COLUMN IF EXISTS email_daily_summary,
|
||||||
|
DROP COLUMN IF EXISTS email_notifications,
|
||||||
|
DROP COLUMN IF EXISTS email_weekly_summary;
|
||||||
@@ -18,6 +18,7 @@ MIGRATION_STATE_FILE = '/data/postgres_migrations_state.json'
|
|||||||
POSTGRES_MIGRATIONS = [
|
POSTGRES_MIGRATIONS = [
|
||||||
'postgres_only_migration.py', # Main migration from commit 4214e88 onward
|
'postgres_only_migration.py', # Main migration from commit 4214e88 onward
|
||||||
'add_note_sharing.sql', # Add note sharing functionality
|
'add_note_sharing.sql', # Add note sharing functionality
|
||||||
|
'remove_email_preferences.sql', # Remove unused email preference columns
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -156,11 +156,6 @@ class UserPreferences(db.Model):
|
|||||||
date_format = db.Column(db.String(20), default='YYYY-MM-DD')
|
date_format = db.Column(db.String(20), default='YYYY-MM-DD')
|
||||||
time_format = db.Column(db.String(10), default='24h')
|
time_format = db.Column(db.String(10), default='24h')
|
||||||
|
|
||||||
# Notification preferences
|
|
||||||
email_notifications = db.Column(db.Boolean, default=True)
|
|
||||||
email_daily_summary = db.Column(db.Boolean, default=False)
|
|
||||||
email_weekly_summary = db.Column(db.Boolean, default=True)
|
|
||||||
|
|
||||||
# Time tracking preferences
|
# Time tracking preferences
|
||||||
default_project_id = db.Column(db.Integer, db.ForeignKey('project.id'), nullable=True)
|
default_project_id = db.Column(db.Integer, db.ForeignKey('project.id'), nullable=True)
|
||||||
timer_reminder_enabled = db.Column(db.Boolean, default=True)
|
timer_reminder_enabled = db.Column(db.Boolean, default=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user