Hmmmm, let me see.
So if I understand schemaupdate right, it does something like this:
1. It checks/compares the database tables and relations with the entities.
2. If there are changes they are updated in the database.
If this is true, it is not good enough for me, or is it? I want something like this:
If I release version 1.0 of my application, I create a version1.0.ddl and inject it into the production database.
After some changes in the entities i release a version 1.1 of my application, and create a version1.1.ddl of my database. I cannot inject this directly into the production database, cause it will remove the existing data.
I want something like a diff-1.1_to_1.0.ddl containing just the difference and inject that into the production database.
Maybe I could do something like this, in order to create the diff-1.1_to_1.0.ddl
In the develop environment, running 1.1, I inject the version1.0.ddl into the development database. Now I call schemaupdate, and ask it to generate a ddl (guess this is possible). This would give me diff-1.1_to_1.0.ddl, right?
-
Just to make things clear, I know this approach is not always a good idea. If you change the type of af field (from string to int) you loose data I guess and would schemaupdate know how to deal with this? But ok, if you know what you are doing, and plan right, you should be able to avoid these kind of problems.
Regards,
René
|