...
Step | Summary | Description | ||
---|---|---|---|---|
| In the bean, add getters and setters and fields |
| ||
2. Scan class for more work | If all bean properties are used elsewhere in class, add those too |
| ||
3. Edit the hbm mapping file | Look at HBM and edit it accordingly |
| ||
4. Add column if upgrade | If this is an upgrade, add the column to the table |
| ||
5. Add in table if starting anew | If loading DDL from scratch, the column should be added when the table is created, not as an alter table. But only do this if building passed the version where it is added |
| ||
6. Similarly add comments | Add comments to all objects for postgres/oracle |
| ||
7. For each DB, install ddl utils | Droponly all objects, then do a -registry -check -useDdlUtils | This will generate the full generated DDL script | ||
7a. Note, a unit test makes this a lot faster | ||||
8. Merge changes to static dll | Merge changes from that full script to the conf/ddl/GrouperDdl_Grouper_install_<db>.sql For each DB | Dont copy the whole script in, just the thing that changed
| ||
9. Correct bottom version | At the bottom of the file is an insert statement, For each DB | e.g. for hsql:
| ||
10. Try an install using the static file | just start grouper shell (with auto ddl) For each DB | Make sure the new column / comment is there | ||
11. Get the DB to the previous | -droponly. Then you can use the previous full SQL from git, For each DB | Run that SQL in your DB client (e.g. dbeaver). See the column isnt there | ||
12. Upgrade using ddl utils (dont run script) | -registry -check -useDdlUtils For each DB. Note, you can do this twice, | The output of that script is a mess. We want the diff to be minimal. Use what you can and craft an upgrade script. Dont worry about the order of columns. If ddlutils says to add a column after another column, ignore that part
| ||
15. Deep ddl check | -registry -deep should report a missing column For each DB | |||
14. Upgrade with static DDL | just start grouper shell (with auto ddl) For each DB | Make sure the new column / comment is there | ||
16. Deep ddl check | -registry -deep should report the DB is up to date For each DB |
...