Created
October 18, 2010 16:36
-
-
Save oc/632533 to your computer and use it in GitHub Desktop.
blog post
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd"> | |
| <changeSet author="oc_aslak" id="25-some-demand-from-userstory-twentyfive"> | |
| <addColumn tableName="some_table"> | |
| <column name="accepted_something" type="BOOLEAN" defaultValueBoolean="true"/> | |
| </addColumn> | |
| </changeSet> | |
| </databaseChangeLog> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd"> | |
| <include file="example/database/db.changelog-1.0.1.xml"/> | |
| <include file="example/database/db.changelog-1.0.2.xml"/> | |
| <include file="example/database/db.changelog-1.0.3.xml"/> | |
| </databaseChangeLog> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package example.database; | |
| import liquibase.exception.CommandLineParsingException; | |
| import java.io.IOException; | |
| import java.util.ArrayList; | |
| import java.util.Arrays; | |
| import java.util.List; | |
| public class Main { | |
| public static void main(String[] args) throws CommandLineParsingException, IOException, NoSuchFieldException, IllegalAccessException { | |
| List<String> defaultArgs = Arrays.asList( | |
| "--driver=com.mysql.jdbc.Driver", | |
| "--url=jdbc:mysql://localhost/databaseName", | |
| "--username=defaultUsername", | |
| "--password=defaultPassword", | |
| "--changeLogFile=example/database/db.changelog-master.xml" | |
| ); | |
| List<String> suppliedArgs = Arrays.asList(args); | |
| List<String> liquibaseArgs = new ArrayList<String>(); | |
| liquibaseArgs.addAll(defaultArgs); | |
| liquibaseArgs.addAll(suppliedArgs); | |
| liquibase.integration.commandline.Main.main(liquibaseArgs.toArray(new String[liquibaseArgs.size()])); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Manifest-Version: 1.0 | |
| Created-By: oc | |
| Main-Class: example.database.Main | |
| Liquibase-Package: liquibase.change,liquibase.database,liquibase.parser,liquibase.precondition,liquibase.serializer,liquibase.sqlgenerator,liquibase.executor,liquibase.snapshot,liquibase.logging,liquibase.ext |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| <build> | |
| <plugins> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-assembly-plugin</artifactId> | |
| <configuration> | |
| <descriptorId>jar-with-dependencies</descriptorId> | |
| <archive> | |
| <manifestFile> | |
| src/main/resources/META-INF/MANIFEST.MF | |
| </manifestFile> | |
| </archive> | |
| </configuration> | |
| <executions> | |
| <execution> | |
| <id>build</id> | |
| <phase>package</phase> | |
| <goals> | |
| <goal>assembly</goal> | |
| </goals> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| </plugins> | |
| </build> | |
| ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment