Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into LB-1222
Browse files Browse the repository at this point in the history
# Conflicts:
#	liquibase-core/src/main/java/liquibase/diff/output/changelog/DiffToChangeLog.java
  • Loading branch information
nvoxland committed Apr 22, 2021
2 parents c0d97bc + 1adbd69 commit f36374c
Show file tree
Hide file tree
Showing 14 changed files with 216 additions and 79 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Build and Test

on: [ pull_request]

jobs:
test:
name: Java ${{ matrix.java }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [8, 11, 16]
steps:
- uses: actions/checkout@v2
- name: Cache Local Maven Repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
- name: Start Docker Databases
run: docker-compose -f ./liquibase-integration-tests/docker/docker-compose.yml up -d
- name: Test With Maven
run: mvn -B test --file pom.xml
- name: Stop Docker Databases
run: docker-compose -f ./liquibase-integration-tests/docker/docker-compose.yml down
- name: Archive Test Results
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: test-reports-jdk${{ matrix.java }}
path: ./**/target/surefire-reports

build:
name: Build Artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache Local Maven Repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Build With Maven
run: mvn -B package -DskipTests -Dliquibase.version.qualifier=-${{ github.head_ref }} -Dbuild.number=${{ github.run_number }} -Dbuild.commit=${{ github.sha }} --file pom.xml
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: liquibase
path: |
liquibase-dist/target/*.jar
liquibase-dist/target/*.zip
liquibase-dist/target/*.tar.gz
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

Binary file added Liquibase.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 66 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,76 @@
# Liquibase
# Liquibase [![Build and Test](https://github.com/liquibase/liquibase/actions/workflows/build.yml/badge.svg)](https://github.com/liquibase/liquibase/actions/workflows/build.yml)
<p align="center"><img src="https://github.com/liquibase/liquibase/blob/master/Liquibase.png" width="30%" height="30%"></p>

Liquibase helps millions of teams track, version, and deploy database schema changes.
Liquibase helps millions of teams track, version, and deploy database schema changes. It will help you to:
- Control database schema changes for specific versions
- Eliminate errors and delays when releasing databases
- Automatically order scripts for deployment
- Easily rollback changes
- Collaborate with tools you already use

This repository contains the main source code for Liquibase.
This repository contains the main source code for Liquibase. For more information about the product, see [the main project website](https://www.liquibase.org/).

For more information about the product, how the project is run, and how you can contribute,
see [the main project website](https://www.liquibase.org/).
## Liquibase Automation and Integrations

## Quickstart
Liquibase Core works with the following databases: Apache Derby, CockroachDB, Firebird, H2, HSQL, Informix, InterBase, MariaDB, MSSQL, MySQL, Oracle, PostgreSQL, SQLite, Sybase Anywhere, Sybase Enterprise. The databases that require extensions are: [Azure Cosmos DB](https://github.com/liquibase/liquibase-cosmosdb), [Cassandra](https://github.com/liquibase/liquibase-cassandra), [Cache](https://github.com/liquibase/liquibase-cache), [DB2i](https://github.com/liquibase/liquibase-db2i), [Hibernate](https://github.com/liquibase/liquibase-hibernate), [Impala/Hive](https://github.com/eselyavka/liquibase-impala), [MaxDB](https://github.com/liquibase/liquibase-maxdb), [MongoDB](https://github.com/liquibase/liquibase-mongodb), [Redshift](https://github.com/liquibase/liquibase-redshift), [SAP HANA](https://github.com/liquibase/liquibase-hanadb), [SQLFire](https://github.com/liquibase/liquibase-sqlfire), [Snowflake](https://github.com/liquibase/liquibase-snowflake), [Teradata](https://github.com/liquibase/liquibase-teradata), [Vertica](https://github.com/liquibase/liquibase-vertica), [VoltDB](https://github.com/diorman/liquibase-voltdb). See [Liquibase Database Tutorials](https://docs.liquibase.com/workflows/database-setup-tutorials/home.html).

[Get started in 5 minutes](https://www.liquibase.org/get-started/first-steps).
Liquibase can be integrated with Maven, Ant, Gradle, Spring Boot, and other CI/CD tools. You can use Liquibase GitHub Actions, Liquibase and Jenkins with Spinnaker, and many different workflows.

## Changelog
## Real-time monitoring and visibility
Try [Liquibase Hub](https://hub.liquibase.com/?_ga=2.53701608.1389719726.1618234889-1334505871.1617797419) to get real-time information about your deployments, an overview of recent commands for the specific database you’re working on, and a place for your team collaboration.

[Learn about the latest improvements](https://github.com/liquibase/liquibase/blob/master/changelog.txt).
## Install and Run Liquibase

### System Requirements
Liquibase system requirements can be found on the [Download Liquibase](https://www.liquibase.org/download) page.

### An H2 in-memory database example for CLI
1. [Download and run the appropriate installer](https://www.liquibase.org/download).
2. Make sure to add Liquibase to your PATH.
3. Copy the included `examples` directory to the needed location.
4. Open your CLI and navigate to your `examples/sql` or `examples/xml` directory.
5. Start the included H2 database with the `./start-h2` command.
6. Run the `liquibase update` command.
7. Optionally, follow the prompt for your email to register for [Liquibase Hub](https://hub.liquibase.com/?_ga=2.53701608.1389719726.1618234889-1334505871.1617797419).
8. Run the `liquibase history` command.
9. If you entered your email, check the report link and the output of the `history` command to see they match.

See also how to [get started with Liquibase in minutes](https://www.liquibase.org/get-started/quickstart) or refer to our [Liquibase Installation](https://docs.liquibase.com/concepts/installation/home.html) documentation page for more details.

## Documentation

Visit the [Liquibase Documentation](https://docs.liquibase.com/home.html) website to find the information on how Liquibase works.

## Courses

Learn all about Liquibase by taking our free online courses at [Liquibase University](https://learn.liquibase.com/).

## Want to help?

Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our
guidelines for [contributing](https://www.liquibase.org/community/index.html)!
Want to file a bug or improve documentation? Excellent! Read up on our guidelines for [contributing](https://www.liquibase.org/community/index.html)!

### Contribute code

Use our [step-by-step instructions](https://www.liquibase.org/community/contribute/code) for contributing code to the Liquibase open source project.

### Join the Liquibase Community

Earn points for your achievements and contributions, collect and show off your badges, add accreditations to your LinkedIn. [Learn more about the pathway to Legend and benefits](https://www.liquibase.org/community/liquibase-legends). Enjoy being part of the community!

## Liquibase Extensions

[Provide more database support and features for Liquibase](https://www.liquibase.org/extensions).

## License

Liquibase is [licensed under the Apache 2.0 License](https://github.com/liquibase/liquibase/blob/master/LICENSE.txt).

[Liquibase Pro](https://www.liquibase.com/products/pro?_ga=2.247557831.1389719726.1618234889-1334505871.1617797419), [Liquibase Business](https://www.liquibase.com/products/business?_ga=2.247557831.1389719726.1618234889-1334505871.1617797419), and [Liquibase Enterprise](https://www.liquibase.com/products/enterprise?_ga=2.247557831.1389719726.1618234889-1334505871.1617797419), with additional features and support, is [commercially licensed](https://download.liquibase.org/eula/?_ga=2.247557831.1389719726.1618234889-1334505871.1617797419).

LIQUIBASE is a registered trademark of [Datical](https://www.liquibase.com/company?_ga=2.247557831.1389719726.1618234889-1334505871.1617797419), INC.

## [Contact us](https://www.liquibase.org/contact)

[Liquibase Forum](https://forum.liquibase.org/?__hstc=128893969.04a95a99cefd4bdc8ee741fa374d8f4e.1617800179911.1618490461125.1618499103903.19&__hssc=128893969.1.1618499103903&__hsfp=3590869226&_ga=2.7605618.1389719726.1618234889-1334505871.1617797419)

[Liquibase Blog](https://www.liquibase.org/blog)
19 changes: 15 additions & 4 deletions base.pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.enforcer.requireMavenVersion>3.6</maven.enforcer.requireMavenVersion>
<maven.enforcer.requireJavaVersion>${maven.compiler.source}</maven.enforcer.requireJavaVersion>
<maven.build.timestamp.format>yyyy-MM-dd HH:mmZ</maven.build.timestamp.format>
<build.timestamp>${maven.build.timestamp}</build.timestamp>
<build.number>0</build.number>
Expand Down Expand Up @@ -184,6 +183,12 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>

<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
Expand All @@ -207,9 +212,6 @@
<version>${maven.enforcer.requireMavenVersion}</version>
<message>This POM requires Maven ${maven.enforcer.requireMavenVersion}.</message>
</requireMavenVersion>
<requireJavaVersion>
<version>${maven.enforcer.requireJavaVersion}</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
Expand Down Expand Up @@ -376,6 +378,15 @@
</build>

<profiles>
<profile>
<id>non-jdk-8</id>
<activation>
<jdk>!1.8</jdk>
</activation>
<properties>
<maven.compiler.release>8</maven.compiler.release>
</properties>
</profile>
<profile>
<id>gpg-sign</id>
<activation>
Expand Down
10 changes: 10 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
Liquibase Core Changelog
===========================================

Changes in version 4.3.4 (2021.04.15)
- Reverts changes from #1722 because they broke other diffChangeLog/generateChangeLog use cases.

Changes in version 4.3.3 (2021.04.09)
- Fixes an issue with changelogsync and hub
- Fixes an issue with diff and NullPointerException (#1631)
- Fixes an issue with NullPointerException and DateTimeType (#1366)
- Fixes an issue with maven resolving/using properties file (#1723)
- Fixes an issue with diffChangeLog and addColumn -> addPrimaryKey ordering (#1722)

Changes in version 4.3.2 (2021.03.25)

- Added new changelogSyncToTag command #1133
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,24 @@ public static void setUpClass() throws Exception {
log = Scope.getCurrentScope().getLog(SchemesCDIConfigBuilder.class);
// log.setLogLevel(LogLevel.WARNING); // you can change it to INFO or DEBUG level if you want to see them

Class c1 = SchemesCDIConfigBuilder.class;
final Field modifiersField = Field.class.getDeclaredField("modifiers");
modifiersField.setAccessible(true);

final Field field1 = c1.getDeclaredField("FILE_LOCK_TIMEOUT");
field1.setAccessible(true);
modifiersField.setInt(field1, field1.getModifiers() & ~Modifier.FINAL);
field1.set(null, FILE_LOCK_TIMEOUT);

final Field field2 = c1.getDeclaredField("ROOT_PATH");
field2.setAccessible(true);
modifiersField.setInt(field2, field2.getModifiers() & ~Modifier.FINAL);

field2.set(null, getRootPath());
try {
Class c1 = SchemesCDIConfigBuilder.class;
final Field modifiersField = Field.class.getDeclaredField("modifiers");
modifiersField.setAccessible(true);

final Field field1 = c1.getDeclaredField("FILE_LOCK_TIMEOUT");
field1.setAccessible(true);
modifiersField.setInt(field1, field1.getModifiers() & ~Modifier.FINAL);
field1.set(null, FILE_LOCK_TIMEOUT);

final Field field2 = c1.getDeclaredField("ROOT_PATH");
field2.setAccessible(true);
modifiersField.setInt(field2, field2.getModifiers() & ~Modifier.FINAL);

field2.set(null, getRootPath());
} catch (NoSuchFieldException e) {
//newer JDK version's don't have the internal fields
}
}

private static String getRootPath() {
Expand Down

0 comments on commit f36374c

Please sign in to comment.