Names and ids
When names need quotes in schema code, and how elements keep their ids, and their comments, as you edit the code.
Names in schema code follow a few quoting rules. Behind each name, the app keeps an id, which is how comments stay on their elements.
Quotes
Put a table, column or enum value name in double quotes when it has spaces or symbols, such as "order items" or "line no". Inside double quotes, write \" for a quote and \\ for a backslash.
Text in single quotes works the same way, with \' for a quote.
Plain names, made of letters, digits and underscores, don't need quotes. The assistant writes names in lower case with underscores, such as order_items, so they never need them.
Ids
Every table, column, relationship, enum and group has an id, such as Table_Orders, Column_OrdersCustomerId or Ref_OrdersCustomerId. Comments, the assistant and connected AI apps refer to elements by id.
When you edit the code, the app keeps each element's id while it's named the same:
- a table or an enum by its name;
- a column by its name in the same table;
- a relationship while it joins the same columns.
So you can reorder blocks and add new ones, and comments stay on their elements.
Rename and keep comments
Renaming a table or a column in the code gives it a new id. To rename something and keep its comments, rename it on the canvas or in Properties.