This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I am starting to evaluate Lightspeed ORM. Before I was using the OpenAccess ORM Mapper. It has a nice feature for comparing the model in code with the connected database and could perform an upgrade of the database schema. As far as I have seen the Lightspeed migration doesn't full fill this requirement. For example: in the database there is missing a table customer, which is present in the code and in the migration. It couldn't be recreate automatically on application start up. At first the DbVersion is the same as the migration, so it doesn't perform an upgrade. But also if decrease the DbVersion, it doesn't work. Because the other chaneges ( for example AddTable) throw an exception. I am confused... |
|
|
If I am understanding correctly the issue is that you are missing a single table and your migration encapsulates a number of operations so when you are trying to recreate the table via a migration it throws an exception due to trying to create objects which are already present? If this is the case then you are correct, the migration framework is not really designed for this situation as the migration steps in a migration as executed as a set. You could however modify the migration code to ignore exceptions as required but that does start to deviate away from how we intent you to work with migrations of course :)
|
|