Dmitri Sotnikov

Results 647 comments of Dmitri Sotnikov

I think that would be a reasonable idea. It sounds like it would just be a matter of having an `init` function that would check if the db exists, and...

Yeah I think that would be easy enough to add. I'll take a look when I get a chance, but if it's something you think you'd like to try to...

I just checked in an update that adds an `init` function for running the initialization script. It looks for the `init.sql` by default, and a custom name can be supplied...

Yeah, looks like you would need to use a different connection for that.

Yup, I'll update the docs once I push out the new release. So, once you use a different connection string everything is working as expected then?

Currently, you have to call `connect` explicitly to initialize the connection: ``` clojure (let [store (proto/make-store config)] (proto/connect store) (proto/init store) (proto/disconnect store)) ``` Perhaps `init` should try to connect...

Hmm, take a look [here](https://github.com/yogthos/migratus/blob/f24349abff66bb21c1f31f617c8778cbadda3b16/test/migratus/test/database.clj#L75) at how the test is setup. The config in the test looks as follows: ``` clojure (def config {:store :database :migration-dir "migrations/" :migration-table-name "foo_bar" :db...

Yeah, clojure.java.jdbc had breaking changes in the API, and `connect` tries to create a migration table if it doesn't exist using the new API.

You could just create the migration table manually. That step will be skipped when it exists.

That's a good point actually, the `init` can't rely on the `connect` function since that one assumes a schema. I'll update to have it do its own connection.