Hi Matt,
It looks nice and the idea is very similar to 
https://github.com/festicket/django-migrate-sql. Problems you are noticing 
are same as my. Easy tracking Git changes, code reviews, one place where 
the final definitions live (like models). It would be nice if Django can do 
that.

Petr


Dne středa 25. března 2020 4:49:42 UTC+1 schinckel napsal(a):
>
>
>
> On Wednesday, March 25, 2020 at 1:45:48 AM UTC+10:30, Petr Přikryl wrote:
>>
>> Hi Adam,
>> thank you for your reply.
>>
>> We usually have few indices, functions and triggers. But the most used 
>> database object is view. We used them for data synchronizing from some 
>> third party databases. These databases have complex schema which we want 
>> simplify. So we are building low-level DB API via views. Then we create 
>> Django models for these views. Then is easy to use ORM for data access or 
>> sync operations. 
>>
>>
> Hi Petr,
>
> I too have a bunch of database Raw SQL. I came up with a mechanism for 
> doing this that allows for/generates numbered versions of each file.
>
> https://schinckel.net/2017/06/07/versioning-complex-database-migrations/
>
> There's no way to hook in to the migrations framework to get this to 
> happen during `makemigrations`, but I have used the checks framework to 
> examine the project for any files that appear to be out of date, and moan 
> about those, as well as a custom management command that generates the 
> migrations for any that have changed, as well as the versions.
>
> There's also a command that copies the current version of the file to the 
> "newest" migration which is useful for development.
>
> I'll try to publish the actual code that does it soon.
>
> Matt.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/f0bbb2e6-123e-48df-bdc8-bc6511aac641%40googlegroups.com.

Reply via email to