3 ms·
> The best practice has, imo, long been to load a schema file which represents what the db should be at the head of a branch and then load up your seeds. Migrat
by RadiozRadioz 3y ago
> The best practice has, imo, long been to load a schema file which represents what the db should be at the head of a branch and then load up your seeds. Migrations are to catch your team and live environments up.
I'm delighted to read this - I tried this method as an experiment in one of my projects, and I really liked it, but I had never seen anyone else do it. Good to hear a confirmation that it's worked elsewhere too.
I'd like to add that it's also advantageous when spinning up DBs in Docker; you can mount your "head" schema files right into initdb.d and have them execute when the container runs.