Fork me on GitHub
#datomic
<
2017-03-03
>
lucasbradstreet02:03:54

Thanks @favila! I'll give it a try.

timgilbert15:03:04

Say, can someone tell me why this query is giving me an error Query is referencing unbound variables: #{?prj-prd}?

(d/q '[:find ?prj-prd .
         :in $ ?prj ?prd
         :where [?prj :project/purchase-list ?li]
                [?li :project-line-item/project-product ?prd-prj]
                [?prd-prj :project-product/global-product ?prd]]
       db project-ref product-ref))

jgdavey15:03:26

Your find clause doesn’t match what’s in the where

timgilbert15:03:56

Argh, I see what you mean now, mistyped the variable

jgdavey15:03:43

:thumbsup:

timgilbert15:03:58

slaps forehead

lellis17:03:52

Hi everyone, I have a recipe on how to do a migration from a datomic database to a new datomic database, because my schemas have some errors that can not be fixed, such as fulltext true | false dbType, etc .... Has anyone ever experienced this?

favila17:03:48

@lellis for attribute-at-a-time problems, I make a new attribute, move all assertions from the old attribute to the new attribute, then rename the new attribute to the old name

favila17:03:55

I don't recopy the db

lellis17:03:38

@favila Nice, but i read something about these "hard" dump and restore. I want to clean my databse and my schemas.

favila17:03:33

@lellis When I just want to reproduce the state of a db, I use transact-backup-datoms in this: https://gist.github.com/favila/785070fc35afb71d46c9

favila17:03:39

(written before memory dbs had a log)

favila17:03:05

But this only reconstructs the datoms visible from a db value, not all datoms in the db

favila17:03:03

The approach would be similiar, instead of reading d/datoms grouped by tx, you read tx-log and turn those into transactions

favila17:03:51

I haven't personally ever done that, but it wouldn't be hard