If I change a field name in a class, DO deletes all the data in that column. This is not standard SQL Server behavior. |
Hello, likely you're using In this mode DataObjects.Net will upgrade any current database schema to match your model types. There is no magic way of guessing what changes were made to the model: column was renamed or column was removed and another column was added. That's why you get this column removed. If you want to actually rename the column and preserve data you'll need to instruct DataObjects.Net to do so by providing upgrade hints. Various model change scenarios are covered in our manual. When using |
PerformSafely won't even change a column name so I am not sure what it is good for... Extracted schema is not equal to the target schema. Details: Schema comparison result: NotEqual Has unsafe actions: true Has column type changes: false Compatible in ValidateLegacy mode: unknown Unsafe actions: RemoveNode, Path=Tables/Child/Columns/C1 You should be able to rename columns without DO remove them. I understand that could break a relationship but this should be the default not removing the column. RemoveNode, Path=Tables/Child/Columns/C2 Schema hints: |