Comment

Comment by kissgyorgy

> And with comments! Explaining why a certain index or constraint exist!

You can put comments in Python files...

> With constraints named meaningfully, available for manipulation, not auth_group_permissions_group_id_b120cbf9_fk_auth_group_id.

You can name your migrations with:

    manage.py makemigrations --name "prettier_name"
> In my opinion, if there is something less likely to happen than writing a complex app to run on interchangeable databases, it's the need to repeat the same history of migrations.

Maybe he never worked in a team? Or wrote any integration tests at all? Or implemented rollback? Because those are pretty much basic things for every serious project.

> I have a patch_db.py script that I have used, with small variations, in several projects.

So you are basically wrote your own schema migrations tool, but inconsistent across projects, and you maintain it yourself. Not a good idea IMO.

parent kissgyorgy 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton