HackerTrans
TopNewTrendsCommentsPastAskShowJobs

drothlis

no profile record

Submissions

Simple declarative schema migration for SQLite

david.rothlis.net
109 points·by drothlis·vor 4 Jahren·28 comments

comments

drothlis
·vor 4 Jahren·discuss
I don't know about Django but in Rails† the migrations are numbered with a timestamp (in the filename itself), instead of a sequential number, precisely to avoid (git) merge conflicts. Then they're run in alphabetical order. There's a dedicated table to record which migrations have been run already.

† 10 years ago, anyway.
drothlis
·vor 4 Jahren·discuss
Ha! I use `textwrap.dedent` all the time but didn't make the leap of logic to check for the existence of `indent`. :-)

I suspect this was a leftover from Python 2.7 days.
drothlis
·vor 4 Jahren·discuss
We are big fans of Datasette (though I've yet to use it in real life). I think it's important work.
drothlis
·vor 4 Jahren·discuss
Thanks! Coincidentally one of the first articles I wrote for my blog was about compile-time checking of table/column names: https://david.rothlis.net/d/templates/

(Just something I was messing around with, not anything I ever used in production.)