{"id":25929619,"url":"https://github.com/fabrecostudio/sqlite-2-turso","last_synced_at":"2025-10-09T11:15:39.389Z","repository":{"id":247833292,"uuid":"826917448","full_name":"fabrecostudio/sqlite-2-turso","owner":"fabrecostudio","description":"🐂 A simple JS script to migrate a local SQLite database to a Turso database on the cloud","archived":false,"fork":false,"pushed_at":"2025-06-03T13:23:19.000Z","size":98,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-24T12:18:42.032Z","etag":null,"topics":["javascript","js","migration","migration-tool","node","nodejs","sqlite","sqlite-database","turso","turso-db"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/fabrecostudio.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-07-10T16:32:05.000Z","updated_at":"2025-06-03T13:23:18.000Z","dependencies_parsed_at":"2024-07-10T22:34:04.464Z","dependency_job_id":"5c5b9045-88a4-451e-824d-eace26f7b8f1","html_url":"https://github.com/fabrecostudio/sqlite-2-turso","commit_stats":null,"previous_names":["pferreirafabricio/sqlite-2-turso","fabrecostudio/sqlite-2-turso"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fabrecostudio/sqlite-2-turso","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrecostudio%2Fsqlite-2-turso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrecostudio%2Fsqlite-2-turso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrecostudio%2Fsqlite-2-turso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrecostudio%2Fsqlite-2-turso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabrecostudio","download_url":"https://codeload.github.com/fabrecostudio/sqlite-2-turso/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrecostudio%2Fsqlite-2-turso/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263083593,"owners_count":23411163,"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":["javascript","js","migration","migration-tool","node","nodejs","sqlite","sqlite-database","turso","turso-db"],"created_at":"2025-03-03T22:09:23.911Z","updated_at":"2025-10-09T11:15:34.364Z","avatar_url":"https://github.com/fabrecostudio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐂 sqlite-2-turso\n\nA simple JS script to migrate a local SQLite database to a Turso database on the cloud.\n\n\u003cimg alt=\"license url\" src=\"https://img.shields.io/badge/license%20-MIT-1C1E26?style=for-the-badge\u0026labelColor=1C1E26\u0026color=8E562E\"\u003e\n\n## 👀 Overview\n\n![Screenshot_10](https://github.com/pferreirafabricio/sqlite-2-turso/assets/42717522/f57661dd-8dee-4150-9e3d-098afc2a405b)\n![Screenshot_11](https://github.com/pferreirafabricio/sqlite-2-turso/assets/42717522/5b79bdeb-7e46-45f5-b697-8f6bfea02992)\n\n## 📖 About\n\nThis project provides a straightforward JavaScript utility for migrating data from a local SQLite database to a Turso database hosted in the cloud. It leverages Node.js and a set of dependencies to facilitate the migration process, ensuring a seamless data transition from a local storage mechanism to a scalable, cloud-based solution.\n\n\u003e [!NOTE]\n\u003e The migration of tables happens in parallel. If the table was not found on Turso, we used the SQL in the [`database/initial-table-creation.js`](database/initial-table-creation.js) file to create it. If the the row already exists on Turso we update it with the local data.\n\n## ✨ Features\n\n- Easy configuration through environment variables.\n- Automated migration of tables and data.\n- Logging support for monitoring the migration process.\n- Utilizes the `@libsql/client` for interacting with the Turso database.\n- Supports SQLite3 for local database interactions.\n\n## 🏄‍♂️ Getting Started\n\n### Prerequisites\n\n- Node.js installed on your machine.\n- Access to a Turso database instance.\n\n### Installation\n\n1. Clone the repository:\n\n```sh\ngit clone https://github.com/pferreirafabricio/sqlite-2-turso.git\n```\n\n2. Install the dependencies:\n\n```sh\ncd sqlite-2-turso\nnpm install\n```\n\n3. Configure your environment variables by copying the .env.example file to .env and filling in the necessary details:\n\n```sh\ncp .env.example .env\n```\n\n### Configuration\n\nThe migration script can be configured via environment variables. Here are the variables you can set:\n\n- `SOURCE_DATABASE_PATH`: The path to your local SQLite database file.\n- `TURSO_DATABASE_URL`: The URL to your Turso database instance.\n- `TURSO_AUTH_TOKEN`: The authentication token for accessing your Turso database.\n- `SILENT`: Set to true to reduce logging verbosity.\n\n## Usage\n\nTo start the migration process, run:\n\n```sh\nnpm run migrate\n```\n\n## 📃 License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabrecostudio%2Fsqlite-2-turso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabrecostudio%2Fsqlite-2-turso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabrecostudio%2Fsqlite-2-turso/lists"}