Closed kaiaverkvist closed 2 years ago
Could you help me understand the issue a bit? What do you mean by field order?
If I define a model like this:
Then field order isn't preserved, causing weird UX inside of for instance phpmyadmin
That makes sense, I think it's because for key-value tables lua does not preserve the order, so we would need to use something like an array instead
fields: {
{ name = "variables", type = "table" },
{ name = "created", type = "createdTime" }
}
I don't think there's an easy solution here without changing the API a lot and making it incompatible with previous versions 😢 The current API is a bit less typing and a easier to parse quickly with your eyes, too.
If there are no issues with field order for actual interaction with the db through code and it's only for coding, I believe there should be a way for you to reorder them in phpMyAdmin. It's definitely annoying but you should only have to do it once
Is this something we can get added support for?