liquibase

jhipster run embedded jar with prod profile - issue with liquibase

独自空忆成欢 提交于 2019-12-11 02:15:27
问题 I have packaged my app with : mvn -Pprod package Then I ran java -jar myapp-0.0.1-SNAPSHOT.war it works fine. But if I run : java -jar myapp-0.0.1-SNAPSHOT.war --spring.profiles.active=prod I am getting this error: [ERROR] org.springframework.boot.context.embedded.tomcat.ServletContextInitializerLifecycleListener - Error starting Tomcat context: org.springframework.beans.factory.BeanCreationException [WARN] org.springframework.boot.context.embedded

problem running liquibase with maven and postgres-db

落花浮王杯 提交于 2019-12-11 01:26:23
问题 I have a problem running maven's liquibase-plugin on a postgresql-db. When trying to run liquibase:update from the command-line, I get the error message [ERROR] Failed to execute goal org.liquibase:liquibase-plugin:1.9.5.0:update (de fault-cli) on project backend-persistence: Error setting up or running Liquibase : liquibase.exception.JDBCException: Error executing SQL CREATE TABLE databasech angeloglock (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED TIMESTAMP WIT H TIME ZONE,

Different Maven configurations for different goals

☆樱花仙子☆ 提交于 2019-12-10 23:14:42
问题 I have a Maven project which includes a Maven plugin (the Liquibase Maven plugin) which exposes different goals. Two of these goals (update and diff) need different parameters which are in conflict between them (because the semantics of the two is different), so I need to give Maven different properties in the two goal executions. That's what I've done <plugin> <groupId>org.liquibase</groupId> <artifactId>liquibase-maven-plugin</artifactId> <version>3.4.1</version> <!-- This configuration is

Migration scripts for Structure and Data

不羁岁月 提交于 2019-12-10 22:44:10
问题 Is there a good or recommended tool that manages both DDLs and DMLs migrations? Majority of my App configuration is stored in a database, I want to be able to freely develop and migrate this and not only the DDLs. Any suggestions on this? 回答1: Both Flyway and Liquibase can deal with DML. Speaking from the Flyway perspective, Flyway has been built from the ground up with both DDL and DML (configuration, reference data, ...) in mind. The whole range of DML commands can be used as migrations are

Flyway/Liquibase for Database Structure and DBUnit for Database Inserts?

£可爱£侵袭症+ 提交于 2019-12-10 17:47:18
问题 I have the following scenario for my application: 1 Production Server 1 Test Server n Development Computers For database migration we use Hibernate Schema Update for the Schema and DBUnit for filling in alle the production data (on all servers/computers). When the schema update is done I generate a new DTD File for the new schema, so I can do a fresh import of the DBUnit XML. The application updates the database at startup with the XML file (only on development and test servers/computers!) Of

Liquibase preconditions not working

一笑奈何 提交于 2019-12-10 15:32:10
问题 I'm trying to use liquibase to track changes to a postgresql database using dropwizard-migrations. I'd like to be able to run the migration on the existing production database instead of rebuilding from scratch. Right now I'm testing in staging. I've created a changeset with a precondition. <changeSet id="3" author="me"> <preConditions onFail="CONTINUE"> <not> <sequenceExists sequenceName="emails_id_seq"/> </not> </preConditions> <createSequence sequenceName="emails_id_seq" startValue="1"

liquibase preconditions yaml

白昼怎懂夜的黑 提交于 2019-12-10 15:13:35
问题 Is it possible to use Precondition in YAML i didn't find any sources except this page http://www.liquibase.org/documentation/yaml_format.html But I am looking for the equivalent of : <changeSet id="addColumn-example"> <preConditions onFail="MARK_RAN"> <columnExists schemaName="earls" tableName="category" columnName="display_name"/> </preConditions> <dropColumn columnName="display_name" schemaName="earls" tableName="category"/> </changeSet> So my natural translation will be : changeSet: id:

Is it okay to integrate database migration tools like Flyway, Liquibase with the application code base?

隐身守侯 提交于 2019-12-10 14:14:17
问题 I mean is it good practice to allow application to modify the db? Or should database migration be done externally to the application code base? New to this, so any input will be appreciated. We are using java and gradle to build the application. 回答1: Flyway author here. Yes! At the end of the day, there are two important forces at play: Your schema is really tightly coupled to your application code : Your application expects certain tables and columns to be present so it can read & write to

Run migrations programmatically in Dropwizard

家住魔仙堡 提交于 2019-12-10 13:12:59
问题 I have dropwizard-application (0.7.0) for which I want to run integration tests. I've set up an integration test using DropwizardAppRule, like this: @ClassRule public static final DropwizardAppRule<MyAppConfiguration> RULE = new DropwizardAppRule<MyAppConfiguration>( MyApplication.class, Resources.getResource("testconfiguration.yml").getPath()); When I try to run the below tests using it, it doesn't work because I haven't run my migrations. What is the best way to run the migrations? Test:

Postgres: modify each array element

烈酒焚心 提交于 2019-12-10 12:01:05
问题 I have a postgres column double[]: {100, 101, 102}. I want to divide each element by 10, so the result should be {10.0, 10.1, 10.2}. I've only found solutions with for-statements, but how to realize this with a simple query? (I need to update through liquibase) The alternative is to write a Java-migration, but I would prefer a simple query... Thanks in advance! UPDATE: A second problem that arose is: When doing this through a Liquibase java-migration script, you get a liquibase.database.jvm