1

Is it possible to create an initial database changelog xml file from the existing state of the database?

I believe I've generated the schema using generateChangeLog, but it doesn't seem to return the stored procedures (or the data).

I'm using SQL Sever 2008

3 Answers 3

3

You can return the data using a diffTypes flag that includes "DATA". See http://www.liquibase.org/documentation/diff.html.

Liquibase cannot currently output stored procedures, however. For that you will need to use a different tool and include them in the generated changelog using the tag.

Sign up to request clarification or add additional context in comments.

1 Comment

Is there a tool to generate the changelog of procedures, functions and trigger ?
2

download liquibase.jar , database driver and save to one directory (Ex:/home/mySystem/liquibase), in the command line change the directory to (/home/mySystem/liquibase) and run the below mentioned command

java -jar liquibase.jar --driver=org.postgresql.Driver --classpath=postgresql-42.1.3.jar --changeLogFile=db.changelog.xml --url="jdbc:postgresql://localhost:5432/<databasename>" --username=<username> --password=<password> update

Reference link:

http://www.liquibase.org/documentation/generating_changelogs.html

Comments

0

I just yesterday discovered SQL Power Architect, which seems to be able to generate Liquibase configurations: http://www.sqlpower.ca/page/architect

For more info on this combination see this blog post: http://blog.mgm-tp.com/2010/11/data-modeling-part2/

1 Comment

Seems like sql power architect suffers from the same limitations when it comes to exporting procedures etc. "However, be aware that if you intend to copy more sophisticated concepts like check constraints, non-standard indices (e.g. Oracle’s Bitmap indexes), triggers, views or stored procedures as well, that Power Architect is not yet able to reverse engineer them automatically. You have to extract this information manually from your existing database and enter the concepts as special “Custom SQL” statements to LiquiBase separately."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.