django-mysql
django-mysql copied to clipboard
MariaDB virtual columns
It may be useful to be able to define Django fields which are backed by virtual columns. They could be read-only but would allow you to control their schema in Django (add db_index, filter by them). I imagine you'd have to specify their functional SQL fragment.
Also MySQL 5.7 introduces generated columns
waiting for this feature ^ ^
I think this might be more suitable in Django core, or it will probably need changes there at least.
What's your use case for virtual columns? I haven't had one myself. Have you tried to create them with a custom migration already?