Discussion:
[Liquibase-user] New Topic: Generate SQL up to a specified tag
Liquibase Community Forum
2010-12-07 14:09:47 UTC
Permalink
A new topic, 'Generate SQL up to a specified tag', has been made on a board you are watching.

You can see it at
http://liquibase.org/forum/index.php?topic=817.new#new

The text of the topic is shown below:

Hi,

first of all: Thanks for LiquiBase :)

I am trying to retrofit LiquiBase onto a project and I am not quite sure how to use it properly to fit my development model:

Context:

I have a project that already had 4 releases. The thing is pretty old and so far all db changes have been made manually (irks). Basically I want to generate two SQL files for for each release called "release_xyz_update.sql" and "release_xyz_rollback.sql". I don't have direct access to the database via LiquiBase. Only to a development database. This is why I need the SQL files. Thanks to the SQL output this should be no problem.

My idea is as following: For every release-cycle I'll use a folder containing all changesets required for the release. The changelog will then be as follows:

Code:
include r1/*
tag r1
include r2/*
tag r2


Questions:

1.) Does this model make sense or do you see some problem with that for future development (Speaking from experience)?

2.) I've gone so far to recreate the releases done so far by studing README.release files and can now update to the latest schema using LiquiBase update. Now I wanted to generate the SQL files for the releases done without LiquiBase. Is there a way I can do that? And only generate the update SQL up to a specific tag? I didn't find anything about that in the documentation. My idea for now is to just comment out parts of the changelog and generate the SQL files incrementally but since there are a few more projects I'll have to migrate after this one (with the same problem) I wondered if there's an automated solution for this

Thanks so much,
Sebastian

Unsubscribe to new topics from this board by clicking here: http://liquibase.org/forum/index.php?action=notifyboard;board=1.0

Regards,
The Liquibase Community Forum Team.

Loading...