CoolFace
Apppublic

tuankg1028/SchemaSync

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
App README

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. 1.Clone the repository
  2. 2.Install dependencies:
   pip install -r requirements.txt
  1. 1.Configure your database connection in .env file

Usage

  1. 1.Start the application:
   python main.py
  1. 1.Open the web interface at http://localhost:7860
  2. 2.Select an action (e.g., Merge Values)
  3. 3.Enter the required information:
  4. 4.Table name
  5. 5.Column name
  6. 6.Values to merge from (comma-separated)
  7. 7.Target value
  8. 8.Click "Preview Changes" to see what would be changed
  9. 9.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
tuankg1028/SchemaSync · CoolFace