{"id":18185979,"url":"https://github.com/jjba23/yggdrasil-schema","last_synced_at":"2025-04-02T00:31:51.338Z","repository":{"id":257657486,"uuid":"858890498","full_name":"jjba23/yggdrasil-schema","owner":"jjba23","description":"https://codeberg.org/jjba23/yggdrasil-schema","archived":true,"fork":false,"pushed_at":"2024-11-28T21:17:25.000Z","size":0,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"trunk","last_synced_at":"2025-03-10T12:57:28.319Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jjba23.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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-09-17T17:55:41.000Z","updated_at":"2025-01-12T18:23:18.000Z","dependencies_parsed_at":"2024-09-18T09:39:04.246Z","dependency_job_id":null,"html_url":"https://github.com/jjba23/yggdrasil-schema","commit_stats":null,"previous_names":["jjba23/yggdrasil","jjba23/yggdrasil-schema"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjba23%2Fyggdrasil-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjba23%2Fyggdrasil-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjba23%2Fyggdrasil-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjba23%2Fyggdrasil-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jjba23","download_url":"https://codeload.github.com/jjba23/yggdrasil-schema/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246735167,"owners_count":20825216,"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","haskell","library","migration","schema","sqlite"],"created_at":"2024-11-02T23:04:16.454Z","updated_at":"2025-04-02T00:31:50.806Z","avatar_url":"https://github.com/jjba23.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"* Yggdrasil Schema\n\n#+begin_html\n\u003cdiv\u003e\n\u003cimg src=\"https://img.shields.io/badge/Haskell-5D4F85?logo=haskell\u0026logoColor=fff\u0026style=plastic\" alt=\"Haskell\"/\u003e\n\u003cimg src=\"https://img.shields.io/badge/SQLite-4169E1?logo=sqlite\u0026logoColor=fff\u0026style=plastic\" alt=\"SQLite\"/\u003e\n\u003cimg src=\"https://img.shields.io/badge/Nix-5277C3?logo=nixos\u0026logoColor=fff\u0026style=plastic\" alt=\"Nix\"/\u003e\n\u003c/div\u003e\n#+end_html\n\nYggdrasil Schema is a Haskell-based tool for managing database migrations.\nInspired by tools like Flyway, or Liquibase, it automates the process of applying migrations, keeping track of which migrations have been executed, and ensuring they only run once.\n\nYggdrasil Schema is designed to be simple, extensible, and adaptable to various storage engines.\n\nInitially, it supports SQLite, but its architecture is open for future extensions to support additional storage engines.\nAs of now available as library only, in the future also as CLI standalone tool (with optparse-applicative).\n\n#+begin_html\n\u003cdiv\u003e\n\u003cimg src=\"./resources/img/yggdrasil.webp\"/\u003e\n\u003c/div\u003e\n#+end_html\n\n** Features\n\n- Automatically applies missing migrations to your database\n- Tracks migration history to ensure each migration is run exactly once\n- Written in Haskell with a focus on functional programming principles\n- Supports SQLite out of the box, other storage engines should be easy to add, and we are open for contributions\n\n** Usage\n\nOnce installed, you can use Yggdrasil to apply migrations to your database.\n\nTake a look at the tests for Yggdrasil itself to familiarize yourself with what it can do, as library:\n[[./test/Yggdrasil/Test/Yggdrasil.hs][./test/Yggdrasil/Test/Yggdrasil.hs]]\n\nBy default, Yggdrasil SQLite branch looks for migration files in the ~./resources/migrations/sqlite/~ directory.\n\n*NOTE* : Keep in mind this slash ( / ) at the end is very important.\n\nAll you need is a directory with migration files.\nThe only requirement in naming the files is that they start with a number and a dash, so that the order can be determined.\n\nExamples of valid files: ~0-init-my-database.sql~ , ~100-another migration with spaces.txt~\n\nTo get things working properly, please ensure that your first migration, called something like ~0-yggdrasil.sql~ contains the following:\n#+begin_src sql\nCREATE TABLE yggdrasil (\n  identifier TEXT NOT NULL PRIMARY KEY,\n  order_value INTEGER NOT NULl,\n  file_name TEXT NOT NULL,\n  ran_at TEXT NOT NULL\n);\n\n#+end_src\n\n** Extending Yggdrasil\n\nYggdrasil is built with extension in mind. You can easily add support for other databases by implementing a new storage engine backend. \n\n** Contributing\n\nWe welcome contributions from the community. Whether it's bug fixes, new features, or documentation improvements, feel free to open a pull request or an issue.\n\n** License\n\nThis project is licensed under the GNU Lesser GPL License v3. See the COPYING file for more details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjba23%2Fyggdrasil-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjjba23%2Fyggdrasil-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjba23%2Fyggdrasil-schema/lists"}