![]() - Replaced unused AJAX and JS methods (`cleanProvisioningProcess`, `showErrorStatus`) in HA management with simpler, streamlined equivalents. Moved HA cluster data fetching logic to the new endpoint (`HAClustersView`). - Introduced `compareConfig()` method to improve configuration diff rendering. Removed redundant templates (`compare.html`), leveraging external Diff2Html library. - Simplified HA service installation logic in `Reconfigure`, enabling task-based tracking. Removed redundant progress logic (`increaseProgressValue`, `checkInstallResp`). - Added support for Spanish localization (`es-ES.html`, updated `languages.html` template). - Replaced Python PagerDuty SDK for a more actively maintained library. - Fixed description rendering logic in HA cluster templates. - Updated Nginx to support multiple aliases per server. - Minor dependency updates and comments cleanup in Ansible WAF tasks. |
||
---|---|---|
.. | ||
20230101000000_initial_migration.py | ||
20230101000001_update_user_groups.py | ||
20230101000002_add_use_src_to_ha_cluster_vips.py | ||
20230101000003_rename_backups_columns.py | ||
20230101000004_rename_multiple_columns.py | ||
20230101000005_add_shared_to_cred.py | ||
20230101000006_delete_prometheus_tools.py | ||
20230101000007_rename_server_to_server_id.py | ||
20230101000008_rename_server_to_server_id_in_s3_backups.py | ||
20230101000009_rename_rhost_to_rserver.py | ||
20230101000010_rename_period_to_time.py | ||
20230101000011_rename_group_to_group_id.py | ||
20230101000012_add_private_key_to_cred.py | ||
20230101000013_add_is_checker_to_udp_balancers.py | ||
20230101000014_update_version.py | ||
20252105000014_update_version.py | ||
README.md | ||
__init__.py | ||
v8_2_1_update_version.py |
README.md
Database Migrations
This directory contains database migration files for Roxy-WI. Each migration file represents a specific change to the database schema.
Migration System
The migration system is designed to track which migrations have been applied, apply migrations in the correct order, and support rollbacks. It uses Peewee's migration functionality to make changes to the database schema.
Migration Files
Each migration file is a Python module with two functions:
up()
: Applies the migrationdown()
: Rolls back the migration
Migration files are named with a timestamp prefix to ensure they are applied in the correct order.
Using the Migration System
The migration system provides a command-line interface for managing migrations. The following commands are available:
Initialize the Migrations Table
python app/migrate.py init
This command creates the migrations table in the database if it doesn't exist.
Create a New Migration
python app/migrate.py create <migration_name>
This command creates a new migration file with the given name. The file will be created in the migrations directory with a timestamp prefix.
Apply Pending Migrations
python app/migrate.py migrate
This command applies all pending migrations in the correct order.
Roll Back Migrations
python app/migrate.py rollback [--steps <number>]
This command rolls back the specified number of migrations (default: 1) in reverse order.
Automatic Migrations
The migration system is automatically run when the application starts up. This ensures that the database schema is always up to date.
Converting from the Old Update System
The old update system used multiple update functions in create_db.py to handle database schema changes. These functions have been converted to migration files in this directory. The application now uses the migration system instead of the old update functions.