New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema Migration #13

mgerlach-klick opened this Issue Dec 14, 2018 · 3 comments


3 participants
Copy link

mgerlach-klick commented Dec 14, 2018

I saw in #4 that schema migration is not currently supported. Are there plans to support this in the future? What's the current workaround for schema migration? Load the database with the old schema, dump it to a file, delete the database, create a database with the new schema and import the data dump?


This comment has been minimized.

Copy link

whilo commented Dec 14, 2018

Yes, this is unfortunately true. You can also overwrite the schema in the database yourself, if you know that it is consistent with its current value.

(swap! conn assoc :schema new-schema)
(datahike.api/transact! conn [])

should do the trick.


This comment has been minimized.

Copy link

mgerlach-klick commented Dec 15, 2018

Oh, good to know! Thank you @whilo !


This comment has been minimized.

Copy link

mgerlach-klick commented Dec 25, 2018

I don't think this actually works.

I modified a schema to make one attribute :db/isComponent true and swap!ed it in. This had no effect on the queries. I'm guessing I would have to modify (:rschema conn) in some way as well?

@kordano kordano added this to To do in Development via automation Jan 16, 2019

@kordano kordano added the question label Jan 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment