Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Re : How to create a "super"-table which will be always created infront of any table?

$
0
0
This is a good place for these kinds of questions. There is also StackOverflow - tag your question 'liquibase'. There are many more people on StackOverflow, so you may get quicker response there rather than here. 

On to your question. As with most things, the answer is 'it depends'. How do you want to use Liquibase? If you intend to use the XML changelog format and enforce that all changes to all database instances are made by developers/DBAs making additions to the XML changelog (or included XML files) then one of the simplest things to do would be to just use the standard XML 'entity include' mechanism. To do that, you would declare the 'standard' columns as an XML entity, and then everywhere you use the createTable tag, you include the entity with the standard columns. 


This of course leaves you open to mistakes and other issues.
- what if someone forgets to include the standard columns? Do you have some other mechanism to check that they are there before deploying to a given database? 
- what if the set of standard columns changes in the future? How will you approach that?

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>