Add HTTPS support with Caddy and clean up legacy files
- Add Caddy reverse proxy for automatic HTTPS with Let's Encrypt - Update docker-compose.yml with Caddy service and internal networking - Remove all Redis dependencies (not needed for this deployment) - Fix Dockerfile permissions for instance and uploads directories - Move legacy scripts to old_code_documentation folder - add_muted_column.py, check_fix_player.py, migrate_add_edit_enabled.py - docker-start.sh, run_dev.sh, start.sh, clean_for_deployment.sh - Add HTTPS_SETUP.md documentation for Caddy configuration - Update .env.example with DOMAIN and EMAIL variables - Remove redis package from requirements.txt - Remove rate limiting Redis storage from config.py
This commit is contained in:
33
old_code_documentation/add_muted_column.py
Normal file
33
old_code_documentation/add_muted_column.py
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Add muted column to playlist_content table."""
|
||||
from app.app import create_app
|
||||
from app.extensions import db
|
||||
|
||||
def add_muted_column():
|
||||
"""Add muted column to playlist_content association table."""
|
||||
app = create_app()
|
||||
|
||||
with app.app_context():
|
||||
try:
|
||||
# Check if column already exists
|
||||
result = db.session.execute(db.text("PRAGMA table_info(playlist_content)")).fetchall()
|
||||
columns = [row[1] for row in result]
|
||||
|
||||
if 'muted' in columns:
|
||||
print("ℹ️ Column 'muted' already exists in playlist_content table")
|
||||
return
|
||||
|
||||
# Add muted column with default value True (muted by default)
|
||||
db.session.execute(db.text("""
|
||||
ALTER TABLE playlist_content
|
||||
ADD COLUMN muted BOOLEAN DEFAULT TRUE
|
||||
"""))
|
||||
db.session.commit()
|
||||
print("✅ Successfully added 'muted' column to playlist_content table")
|
||||
print(" Default: TRUE (videos will be muted by default)")
|
||||
except Exception as e:
|
||||
db.session.rollback()
|
||||
print(f"❌ Error adding column: {e}")
|
||||
|
||||
if __name__ == '__main__':
|
||||
add_muted_column()
|
||||
Reference in New Issue
Block a user