weavejester / ragtime

Database-independent migration library
Eclipse Public License 1.0
612 stars 85 forks source link

Instructions on Concepts wiki page does not match `ragtime 0.8.1` behavior #161

Closed teodorlu closed 3 weeks ago

teodorlu commented 9 months ago

Reading https://github.com/weavejester/ragtime/wiki/Concepts, I see this:

user=> (ragtime/applied-migrations db)
("add-foo")

When I tried running (ragtime/applied-migrations db) in my own project, I got this error:

1. Unhandled clojure.lang.ArityException
   Wrong number of args (1) passed to: ragtime.core/applied-migrations

Reading the ragtime source, I see that ragtime.core/applied-migrations takes two arguments, a store and an index:

(defn applied-migrations
  "List all migrations in the index that are applied to the database."
  [store index]
  (->> (p/applied-migration-ids store)
       (map index)
       (remove nil?)))
teodorlu commented 9 months ago

Also wanted to say that I'm learning a lot working through a migration setup in my project. I really appreciate Ragtime giving me the core concepts, rather than a pre-packaged migration setup for a specific database. Thanks for making this!

weavejester commented 3 weeks ago

Thanks for the report, and sorry for the delay in getting around to fixing it. The documentation has now been corrected.