{"repo":"luislavena/drift","free":true,"listed":false,"github":"https://github.com/luislavena/drift","clone":"git clone https://github.com/luislavena/drift.git","description":"SQL-driven schema migration tool and library for Crystal","language":"Crystal","stars":31,"topics":["crystal","library","sql","cli","sqlite"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"Drift SQL-driven schema migration tool and library Drift provides a framework-agnostic schema migration approach based on SQL files. No magic DSL to learn, no weird ORM limitations to deal with, just plain and simple SQL files in a folder, tracked and applied or reverted (rollback) sequentially or in batches, and that's all. [!WARNING] Drift is still in early development and the UX/DX around the CLI and library/classes might change between versions. Features Self-contained migration files (both migrate and rollback statements within same .sql file). No new DSL or ORM to learn, just plain .sql files in a folder. A CLI to facilitate generation and execution of migrations. An optional library to be integrated within your project (Eg. to check and run migrations on start). Currently works with SQLite3, but can be adapted to be DB-agnostic, compatible with any Crystal DB adapter. Overview Drift aims to be a slim layer that orchestrates executing SQL statements against a database. This applies to both the CLI and the library (Crystal shard). Each migration file must contain two special comments before any SQL statements: drift:up to indicate that the following statements should be executed when migrating and drift:down to indicate the statements should be executed when rolling back the migration. Each type (up, down) within the file can contain multiple SQL statements. Statements can span multiple lines, but all must be properly terminated using ; . For complex SQL statements that ","default_branch":null,"files":null,"tree":[],"storefront":"/r/luislavena","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/luislavena/drift/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}