I see the commit in Version History and the last commit is selected “Master → Published” but I don’t see any changes on the web page or if I clone the repo again.
You’d normally see a warning that the db doesn’t match the schema. If you then follow the link in that warning, you get to decide how to handle that mismatch.
Evidently, this affects only the order in which the IDE displays the columns. The order in which search() returns them, within a row, cannot be relied on.
I have seen Anvil reorder dictionaries when passed via an anvil.server.call, which is consistent with Python’s own [lack of] ordering guarantees for Python 3.6 and earlier: order is not guaranteed. I expect the same reordering can take place for any table row.
If you want to process things in a consistent order, start with an order-preserving object: a list, e.g., a list of column names. That ordering will remain consistent for the lifetime of the list.
Rather than me or anyone else having to spend time attempting to work out what the problem is, could you please spell out what exactly is not as you expect.
I understand that search() ignores the yaml file but why does IDE? You can see in the image above the columns in IDE are not in the same order as in the yaml file.
It seems the order from yaml is ignored also the “order: integer” is also ignored.
The only way to change it is with mouse drag which will add “integer: -integer/float” which I don’t understand:
If you sort by this value, I would expect you to get the columns in the IDE’s order.
This is a long-standing Feature Request. You can tell an App to add missing columns, when referenced; but then any typos or bugs in your code could end up adding unwanted columns, so most of us leave that feature turned off. Otherwise, Application code cannot manage table structure, only its content.
When we load the database in the IDE we consider what is stored in the database as the source of truth.
When there is a mismatch between your yaml column definitions and the Database column definitions we show you a schema mismatch link.
However, for convenience, we don’t consider the order of columns as a schema mismatch.
So the only way to re-order columns, is to do it via the UI i’m afraid.