Re: Thoughts on diff-based migrations with django?

2018-05-02 Thread Florian Apolloner
Just for one migration; but there is the sqlmigrate management command which you can use as building base. Cheers, Florian On Wednesday, May 2, 2018 at 7:07:27 AM UTC+2, djrobstep wrote: > > Bump! Is there a documented way to generate the from-scratch creation SQL > for the currently defined

Re: Thoughts on diff-based migrations with django?

2018-05-01 Thread djrobstep
Bump! Is there a documented way to generate the from-scratch creation SQL for the currently defined models? If not, is it possible to add something that spits this out? Happy to take a look at implementing this. On Sunday, 25 February 2018 13:48:27 UTC+11, djrobstep wrote: > > Yes, I don't

Re: Thoughts on diff-based migrations with django?

2018-02-24 Thread djrobstep
Yes, I don't think it would make sense to include in django directly. Because the diffing approach works at the database directly, below the layer of the models, the two parts don't really need to be integrated. All that is really required for django to support this as an option is to provide

Re: Thoughts on diff-based migrations with django?

2018-02-20 Thread Andrew Godwin
Hi, This was an approach we deliberately avoided during development of the current migration system - it works poorly with diverging feature branches and requires that your developers have access to production schema at all times (and additionally that you don't have divergent

Re: Thoughts on diff-based migrations with django?

2018-02-20 Thread djrobstep
Yes, this approach certainly doesn't magically solve data migration issues, however the data migrations question has been a common one. The nature of data migrations is that they are very one-off and context dependent and so still something you'd need to script up manually. You might use the

Re: Thoughts on diff-based migrations with django?

2018-02-20 Thread Curtis Maloney
Hi, I must say your idea intrigues me... and I'd certainly like to discuss it further. The first thought that comes to mind is how would such a system handle data migrations? Being able to leap from one schema state to another is great, buy typically in the life-cycle of a reusable app

Thoughts on diff-based migrations with django?

2018-02-20 Thread djrobstep
Hi all, Some thoughts on schema migrations that may interest you. By way of background, I'm the author of migra (https://github.com/djrobstep/migra), a schema comparison/diff tool for Postgres. I initially wrote this tool because I wanted to be able to generate migration scripts