This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-02-06
Channels
- # aleph (43)
- # announcements (11)
- # babashka (35)
- # beginners (70)
- # calva (4)
- # cider (8)
- # clerk (15)
- # clojure (192)
- # clojure-dev (7)
- # clojure-europe (44)
- # clojure-nl (2)
- # clojure-norway (65)
- # clojure-uk (4)
- # code-reviews (4)
- # conjure (1)
- # cursive (41)
- # data-science (1)
- # datomic (8)
- # emacs (7)
- # fulcro (13)
- # humbleui (17)
- # hyperfiddle (53)
- # kaocha (4)
- # malli (7)
- # missionary (17)
- # music (1)
- # obb (1)
- # off-topic (8)
- # polylith (1)
- # portal (3)
- # releases (11)
- # shadow-cljs (36)
- # squint (4)
- # tools-deps (4)
Hey all, I've accidentally transacted a schema with a typo in valueType
(string instead of a ref).
I know that a type of an attribute cannot be modified, but I was wondering if I can restore the schema somehow, or I have to change the name of the attribute?
You can either restore a backup from before you made the attribute, or you can rename the attribute
:something/my-attr
-> :DO-NOT-USE/my-attr
for example. If you want even more safety, you can install an attribute predicate that always throws--that makes it impossible to assert anything with that attribute
Backup and restore is not an option since production data has been inserted already (but not to this attribute).
Something bothers me with :DO_NOT_USE
, I don't like "garbage" in my db...
Why isn't it possible to delete an attribute without values?
I can’t speak for datomic team, but I imagine it’s two reasons: 1) the cases where retraction would be safe are vanishingly small (i.e. never asserted the attribute as an attribute in a datom ever), so it’s not worth the engineering effort for a probably tricky implementation. 2) Datomic is philosophically opposed to deleting mistakes: https://blog.datomic.com/2014/08/stuff-happens-fixing-bad-data-in-datomic.html