{"id":15540123,"url":"https://github.com/hden/ragtime.datomic","last_synced_at":"2025-04-23T16:24:16.457Z","repository":{"id":39755778,"uuid":"224562799","full_name":"hden/ragtime.datomic","owner":"hden","description":"Manage datomic schema with ragtime","archived":false,"fork":false,"pushed_at":"2025-02-03T18:09:39.000Z","size":75,"stargazers_count":6,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T16:24:07.417Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hden.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":"2019-11-28T03:29:12.000Z","updated_at":"2024-09-06T01:27:30.000Z","dependencies_parsed_at":"2022-09-20T11:24:29.667Z","dependency_job_id":"84eced5b-080a-44ce-99a5-7f0f25cc4fc4","html_url":"https://github.com/hden/ragtime.datomic","commit_stats":{"total_commits":35,"total_committers":3,"mean_commits":"11.666666666666666","dds":0.3142857142857143,"last_synced_commit":"838ff80281962118d72759343a525713d3fd6cbf"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hden%2Fragtime.datomic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hden%2Fragtime.datomic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hden%2Fragtime.datomic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hden%2Fragtime.datomic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hden","download_url":"https://codeload.github.com/hden/ragtime.datomic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250468610,"owners_count":21435516,"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":[],"created_at":"2024-10-02T12:12:48.056Z","updated_at":"2025-04-23T16:24:16.435Z","avatar_url":"https://github.com/hden.png","language":"Clojure","readme":"# ragtime.datomic [![CircleCI](https://circleci.com/gh/hden/ragtime.datomic/tree/master.svg?style=svg)](https://circleci.com/gh/hden/ragtime.datomic/tree/master) [![codecov](https://codecov.io/gh/hden/ragtime.datomic/branch/master/graph/badge.svg?token=H3B9JL6DQX)](https://codecov.io/gh/hden/ragtime.datomic)\n\nManage datomic schema with [ragtime](https://github.com/weavejester/ragtime).\n\n## Warnings\n\nIn Datomic, changing an existing schema attribute is similar to accumulate a new schema attribute. Since its not possible to rollback and redo a transaction, it is recommended to set the migration strategy to `ragtime.strategy/raise-error`.\n\nhttps://docs.datomic.com/cloud/schema/schema-change.html\n\n\n## Usage\n\nFirst, add the following dependency to your project:\n\n`[ragtime.datomic \"0.3.0\"]`\n\nOnce you have at least one migration, you can set up Ragtime. You'll need to build a configuration map that will tell Ragtime how to connect to your database, and where the migrations are. In the example below, we'll put the configuration in the user namespace:\n\n```clojure\n(ns user\n  (:require [datomic.client.api :as datomic]\n            [ragtime.datomic :as rd]\n            [ragtime.repl :as repl]))\n\n(def client (datomic/client {:server-type :peer-server\n                             :access-key \"myaccesskey\"\n                             :secret \"mysecret\"\n                             :endpoint \"localhost:8998\"}))\n\n(def conn (datomic/connect client {:db-name \"hello\"}))\n\n(def migration (rd/create-migration :id [:db/ident :inv/sku\n                                         :db/valueType :db.type/string\n                                         :db/unique :db.unique/identity\n                                         :db/cardinality :db.cardinality/one]))\n\n(def config\n  {:datastore  (rd/create-connection conn)\n   :migrations [migration])\n\n(repl/migrate config)\n```\n\n\nThis library will install an extra schema inn your database.\n\n```clojure\n{:db/ident       :ragtime.datomic/migration-id\n :db/valueType   :db.type/keyword\n :db/unique      :db.unique/value\n :db/cardinality :db.cardinality/one}\n```\n\nThe following datum will be appended to each of the schema transactions.\n\n```\n[:db/add \"datomic.tx\" :ragtime.datomic/migration-id migration-id]\n```\n\n## License\n\nCopyright © 2019 Haokang Den\n\nThis program and the accompanying materials are made available under the\nterms of the Eclipse Public License 2.0 which is available at\nhttp://www.eclipse.org/legal/epl-2.0.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhden%2Fragtime.datomic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhden%2Fragtime.datomic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhden%2Fragtime.datomic/lists"}