721+ DevOps - Best practice to isolate DB schema changes?
I am looking for best practice to isolate schema changes during deployment.
Is it conceptionally possible to
- create a RAP with schema changes only?
- automatically (not manually) generate the SQL statements for a particular environment (either at the time of RAP creation or RAP import)?
I have not experimented yet, but I assume that the actual SQL depends on the target system.
This actually brings me to other questions:
Is the generated SQL independent of the actual DB flavour? (ANSI SQL?)
Does the generated SQL always contain all changes wrt. to a 'new' DB?
Can the generated SQL cope with variations in the target DB? (E.g. a table already exists or a property is already exposed)?
As part of moving schema changes to higher environments,
1) If its a change in the table then save the Data-Admin-DB-Table instance of that particular class and include in the RAP, the time of deployment to higher version it will give an option to generate DDL query which we can download execute @DB level or we can go ahead with deployment which the table will be saved.
2) If any addtional schema changes like manullay we need to execute some query to add/truncate etc..we need to write sql query and need to execute in higher environments.