This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-15
Channels
- # architecture (2)
- # beginners (16)
- # boot (2)
- # cider (4)
- # clara (6)
- # cljs-dev (78)
- # cljsrn (3)
- # clojure (158)
- # clojure-austin (1)
- # clojure-belgium (1)
- # clojure-dusseldorf (19)
- # clojure-italy (8)
- # clojure-russia (3)
- # clojure-spec (77)
- # clojure-uk (61)
- # clojurescript (341)
- # cursive (9)
- # data-science (12)
- # datomic (18)
- # emacs (9)
- # fulcro (109)
- # hoplon (10)
- # juxt (2)
- # leiningen (2)
- # lumo (31)
- # off-topic (1)
- # om (4)
- # onyx (40)
- # parinfer (17)
- # re-frame (36)
- # reagent (19)
- # spacemacs (10)
- # vim (60)
- # yada (20)
morning!
morning
morning
well.. fighting with an SQL database... not much fun.... trying to delete an entry... but keep running into constraints that mean you can't just do a delete...
no cascading delete available @thomas ?
what flavour of db is it ?
you can probably do an alter-table to add the cascade to the constraints...
how much do you care about keeping consistency? You can just turn off constraints in MySQL 😄
(it is test data only anyway at the moment... so recreating wouldn't be a problem anyway) not sure if they want it in production though.
@glenjamin actually I am quite tempted to do that... 😉
why not just fix the schema, then you will have no problems now or in the future ?
The customer might not like us changing the DB schema, it is an existing schema already in prod at the moment.
presumably there will be migrations on the schema ? i just counted 139 migrations on my db schema over the last 2 years!
@mccraigmccraig Out of interest, what are you using for migrations? ragtime?
@chrisjd i'm using https://github.com/macourtney/drift - if i was starting again i would probably try ragtime or joplin, but i was familiar with drift from an earlier project and had already patched it to my needs (those being cassandra and elasticsearch)
drift doesn't do an awful lot - it creates template migration namespaces with up/down fns and calls them in order - you give it a couple of fns which it uses to determine current migration state and to set up for running migrations, so it's easy to adapt to any old datastore
in my migration namespaces i just call my regular db connectors... all very straightforward
joplin and ragtime look like they have approaches to dealing with conflicts though, which is probably the major pain point
if you get conflicts at the schema level you’re probably not talking/integrating enough?
@glenjamin the conflicts i'm thinking of come from merging branches resulting in interleaving of migrations from each branch
but maybe those are not the conflicts that joplin/ragtime are talking about... dunno
there's a third option 🙂
generally I’d expect interleaved migrations is only an issue if you both touch the same part of the schema, and if there’s a chance that this could happen you should probably get the migrations merged into the mainline quickly and released even while development is still ongoing
yeah, i generally end up doing a rebase, but manually
and i don't have the option of adding stuff to the mainline at arbitrary times - my clients are mostly apps and apple's review process imposes fairly rigid release constraints
My assumption has always been that ragtime’s apply-new
is how migration runners work (ever since i used the one in rails)
ah, i see, yeah that could work - rebasing works too though
afternoon!
good afternoon 🙂