--- title: SchemaSync app_file: main.py sdk: gradio sdk_version: 5.25.0 --- # SchemaSync SchemaSync is a tool for managing database schema changes and value merges with automatic foreign key detection. ## Features - Merge database values while automatically updating all related tables - Preview changes before applying them - Easy-to-use web interface built with Gradio - Supports PostgreSQL databases ## Installation 1. Clone the repository 2. Install dependencies: ``` pip install -r requirements.txt ``` 3. Configure your database connection in `.env` file ## Usage 1. Start the application: ``` python main.py ``` 2. Open the web interface at http://localhost:7860 3. Select an action (e.g., Merge Values) 4. Enter the required information: - Table name - Column name - Values to merge from (comma-separated) - Target value 5. Click "Preview Changes" to see what would be changed 6. Click "Run Operation" to apply the changes ## Development The project is structured as follows: - `schema_sync/` - `__init__.py` - Package initialization - `app.py` - Gradio web interface - `config.py` - Configuration handling - `db_connector.py` - Database connection - `schema_inspector.py` - Schema inspection and foreign key detection - `merge_operations.py` - Core merge functionality - `main.py` - Application entry point - `requirements.txt` - Dependencies