BezBartek / django-db-views

Creating automatic migrations for Views models witch working reverse and full command options like in normal makemigrations
MIT License
62 stars 12 forks source link

Migration SQL should not be one long line of SQL #29

Open ckoppelman opened 10 months ago

ckoppelman commented 10 months ago

I write view_definition SQL in my model as long multiline strings. When I run makeviewmigrations, it just spits out the string in one long line, newlines included. It would be much easier to read if it would generate a multiline string as I write. I'm not sure that's easy to do, but perhaps if there's a newline in the string, it can be a clue to generate a multiline string instead of a single line. Honestly, I'd like it even more if the multiline strings were variables that were pulled out, but I can see different opinions on that.

BezBartek commented 10 months ago

I will dig into it, I hope that it will be easy to change