{"id":15050573,"url":"https://github.com/gabrieltorelo/database_difference_checker-python_sqlite","last_synced_at":"2026-03-16T18:01:33.094Z","repository":{"id":255428361,"uuid":"847968756","full_name":"GabrielTorelo/Database_Difference_Checker-Python_SQLite","owner":"GabrielTorelo","description":"Python script to read SQLite files and check the differences between them.","archived":false,"fork":false,"pushed_at":"2024-08-29T03:02:09.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-14T02:13:41.104Z","etag":null,"topics":["database","python","sqlite"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GabrielTorelo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-26T22:24:54.000Z","updated_at":"2024-08-29T23:44:39.000Z","dependencies_parsed_at":"2024-08-29T23:51:07.547Z","dependency_job_id":"146f4e50-30c6-41c7-8ed7-7457674c6505","html_url":"https://github.com/GabrielTorelo/Database_Difference_Checker-Python_SQLite","commit_stats":null,"previous_names":["gabrieltorelo/database_difference_checker-python_sqlite"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielTorelo%2FDatabase_Difference_Checker-Python_SQLite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielTorelo%2FDatabase_Difference_Checker-Python_SQLite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielTorelo%2FDatabase_Difference_Checker-Python_SQLite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielTorelo%2FDatabase_Difference_Checker-Python_SQLite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GabrielTorelo","download_url":"https://codeload.github.com/GabrielTorelo/Database_Difference_Checker-Python_SQLite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243510122,"owners_count":20302294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","python","sqlite"],"created_at":"2024-09-24T21:27:31.782Z","updated_at":"2025-12-26T19:06:16.195Z","avatar_url":"https://github.com/GabrielTorelo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Database_Difference_Checker-Python_SQLite\nPython script to read SQLite files and check the differences between them.\n\n## Before you start!\nThis document provides a step-by-step guide to performing comparison between SQLite databases using the `Database_Difference_Checker-Python_SQLite` script.\n\n## Instructions for Use\n### 1. Using filters for tables and/or columns _(Optional Step)_\n- **Table Filters**: Edit the `constants/general.py` file and add the names of the tables you want to exclude from the comparison within the `EXCLUDED_TABLES` constant.\n  #### Example:\n  ```\n  EXCLUDED_TABLES = {\"table1\", \"table2\", \"table3\"}\n  ```\n- **Column Filters**: Edit the same file and add the names of the columns to be excluded from the comparison within the `EXCLUDED_COLUMNS` constant.\n  #### Example:\n  ```\n  EXCLUDED_COLUMNS = {\"column1\", \"column2\", \"column3\"}\n  ```\n\n### 2. Adding SQLite databases for comparison\nPlace the SQLite `(.db)` files you want to compare inside the `MOCK/DATA` folder.\n\n- For contexts of different databases _(for example, databases from different companies)_, it is ideal, but not mandatory, to organize the databases in different folders within `MOCK/DATA`.\n  #### Example:\n  ![image](https://github.com/user-attachments/assets/4d439483-bdcb-4bb4-aa0e-7f73a28ae0b6)\n\n### 3. Adding the reference file\nAdd the file with the reference data to the `MOCK/PATTERN` folder. **The reference file can be in `.txt`, `.json`, `.sqlite` or `.db` format**.\n\n### **Important**\n- **The `.sqlite` and `.db` files take precedence over the others**\n- The file must follow the pattern **_key-value_** _(key: value)_, with the **VALUE ALWAYS WRAPPED IN BRACKETS**.\n  #### Examples for text file `(.txt)`:\n  - **Example 1 (without line break):**\n    ```\n    TABLE_1:[{...}]TABLE_2:[...]TABLE_3:[...]\n    ```\n  - **Example 2 (with line break):**\n    ```\n    TABLE_1:[{...}, {...}]\n    TABLE_2:[{...}]\n    TABLE_3:[...]\n    ```\n  #### Example for JSON file `(.json)`:\n  ```\n  {\n      \"TABLE_1\": [\n          {\n              \"name\": \"XXXX\",\n              \"type\": \"XXXX\"\n          },\n          {\n              \"name\": \"XXXX\",\n              \"type\": \"XXXX\"\n          }\n      ],\n      \"TABLE_2\": [\n          {\n              \"name\": \"XXXX\",\n              \"type\": \"XXXX\"\n          }\n      ],\n      ...\n  }\n  ```\n\n### 4. Analysis of Results\nAfter executing the script, check the `trackingCode`. The code `00` indicates that the process completed without errors (other tracking codes in the section below).\n\n**The comparison results will be saved in a JSON file in the project root folder, called `Output.json` .**\n\n#### Example of `Output.json` file:\n```\n{\n    \"MAIN_DATABASE_1\": {\n        \"DATABASE_SQLite_1\": {\n            \"Missing_Tables\": [...],\n            \"Missing_Data\": {\n                \"TABLE_1\": [\n                {\n                    \"name\": \"XXXX\",\n                    \"type\": \"XXXX\"\n                }\n                ],\n                \"TABLE_2\": [...]\n            }\n        },\n        \"DATABASE_SQLite_2\": {...}\n    },\n    \"MAIN_DATABASE_2\": {...}\n}\n```\n\n## Tracking Codes\n\nTracking codes indicate the status of the process:\n\n- `00`: **Finished without errors**\n- `01`: **An unexpected error occurred**\n- `02`: **Error reading file(s)**\n- `03`: **Error reading file(s) from directory**\n- `04`: **Error in the comparison process**\n- `05`: **Error generating `Output.json` file**\n- `06`: **Error reading data from databases**\n- `07`: **Error generating JSON from databases**\n- `08`: **Error when fetching JSON files from databases**\n- `09`: **Error creating reference JSON**\n- `10`: **Invalid file extension**\n\n## 🛠 Used Packages\n\n| Name      | Version |\n| :-------- | :------ |\n| 🐍 Python | `3.8.0` |\n\n## 🔗 Links\n\n[![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge\u0026logo=github\u0026logoColor=white)](https://github.com/GabrielTorelo/Database_Difference_Checker-Python_SQLite)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrieltorelo%2Fdatabase_difference_checker-python_sqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabrieltorelo%2Fdatabase_difference_checker-python_sqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrieltorelo%2Fdatabase_difference_checker-python_sqlite/lists"}