SkillAgentSearch skills...

DBFxSQL

Tool for bi-directional data synchronization between DBF files and SQL databases.

Install / Use

/learn @joelabreurojas/DBFxSQL
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<h1 align='center'> DBFxSQL </h1> <p align='center'> <em>Configure once, sync automatically!</em> </p> <h6 align='center'> <a href="https://github.com/joelabreurojas/DBFxSQL/blob/main/LICENSE"> <img alt='MIT License' src='https://img.shields.io/static/v1.svg?label=License&message=MIT&logoColor=d9e0ee&colorA=302d41&colorB=blue'/> </a> <a href="https://github.com/joelabreurojas/DBFxSQL/blob/main/dbfxsql/constants/data_types.py"> <img alt='Supports dBase, SQLite & MSSQL' src='https://img.shields.io/static/v1.svg?label=Support&message=dBase/SQLite/MSSQL&logoColor=d9e0ee&colorA=302d41&colorB=blue'/> </a> <a href="https://deepwiki.com/joelabreurojas/DBFxSQL"> <img alt='Ask DeepWiki' src='https://img.shields.io/static/v1.svg?label=Ask&message=DeepWiki&logoColor=d9e0ee&colorA=302d41&colorB=blue'/> </a> </h6>

 

✨ Overview

DBFxSQL enables seamless data consistency between legacy DBF (dBase) files and modern SQL databases during migration projects. Instead of managing two separate data systems manually, DBFxSQL automatically synchronizes changes in both directions, eliminating data reconciliation headaches.

Suitable for:

  • Organizations migrating from DBF to SQL while maintaining production systems.
  • Development teams building new SQL systems alongside existing DBF infrastructure.
  • One-time clean migrations without ongoing DBF dependencies.

 

🔌 Installation

  1. Check your Python version, we use python = "^3.12":
python --version
  1. Clone the repository:
git clone https://github.com/joelabreurojas/DBFxSQL.git
  1. Create and activate a virtual environment.

  2. Install the source code:

pip install DBFxSQL/
  1. Run the tool:
dbfxsql

 

💻 Usage

  1. Create a DBF file:
dbfxsql create -s users.dbf -f id "N(20,0)" -f name "C(20)"
  1. Insert data into DBF:
dbfxsql insert -s users.dbf -f id 1 -f name "John Doe"
  1. Create SQL database and table:
dbfxsql create -s company.sql -t users -f id 'integer primary key' -f name text
  1. One-time migration:
dbfxsql migrate --notify
  1. Continuous synchronization:
dbfxsql sync --notify
<br>

[!TIP] Use the --help flag to see all available commands and options.

Example: dbfxsql <command> --help

 

⚙️ Configuration

DBFxSQL uses TOML configuration files to define:

  • Database engines and their file extensions.
  • Folder paths to monitor.
  • Table relationships and synchronization priorities.
  • Field mappings between DBF and SQL schemas.

The tool automatically creates a default configuration on the first run at ~/.config/DBFxSQL/config.toml.

 

📌 Disclaimer

Before using, create backups of your DBF files and SQL databases.

Known limitations:

  • Requires local file system access.
  • MSSQL connection issues in database manipulation commands.
  • Some advanced features are still under development.

Use at your own risk and carefully verify data integrity after operations.

 

📝 To do

Required:

  • [ ] Fix connection in DB manipulation commands for MSSQL.
<details> <summary><strong>Desirable:</strong></summary> <br> <ul> <li>[ ] Add a changelog.</li> <li>[ ] Add loading bar during migration.</li> <li>[ ] Add option to initialize triggers/procedures in cli.</li> <li>[ ] Add option to listen alternative files in config.</li> <li>[ ] Add option to specify migration/sync order in config.</li> <li>[ ] Add errors for wrong config.</li> <li>[ ] Add FIELDS option to filter read requests.</li> <li>[ ] Add option to specify field target for indirect table relations in config.</li> <li>[ ] Balance the number of rows between indirect table relationships (large over small).</li> <li>[ ] Add CDC into SQL layers.</li> <li>[ ] Add Command Query Responsibility Segregation (CQRS) pattern.</li> <li>[ ] Refactor store procedure write_file (use CLR procedures).</li> <li>[ ] Refactor read queries by group origin tables by destiny tables for migration/sync optimizations.</li> <li>[ ] Validate existence of received field type.</li> <li>[ ] Validate KeyErrors for invalid fields.</li> <li>[ ] Validate type lengths and names for consistency between DBF and SQL.</li> <li>[ ] Validate existence of target fields during sync.</li> <li>[ ] Release as a Python library.</li> </ul> </details>

 

👐 Contribute

Improvements?

  • Don't hesitate to create a PR.

Problems?

  • Feel free to open a new issue!

 

❤️ Gratitude

Special thanks to the following projects for making this tool possible:

Related Skills

View on GitHub
GitHub Stars9
CategoryData
Updated3mo ago
Forks0

Languages

Python

Security Score

87/100

Audited on Dec 30, 2025

No findings