jhipster liquibase diff heroku -


i have create simple jhipster app , deployed heroku. work fine added new field simple object , redeploy. got following error:

2016-09-07t12:32:49.375947+00:00 heroku[router]: at=info method=post path="/api/tsts?cachebuster=1473251569324" host=deplyjhip.herokuapp.com request_id=2b7190f7-0301-456d-87a9-7342640aad9d fwd="5.2.192.47" dyno=web.1 connect=0ms service=17ms status=500 bytes=532 2016-09-07t12:32:49.361875+00:00 app[web.1]: 2016-09-07 12:32:49.361 error 3 --- [io-40257-exec-5] o.h.engine.jdbc.spi.sqlexceptionhelper   : error: column "amend" of relation "tst" not exist 2016-09-07t12:32:49.361530+00:00 app[web.1]: 2016-09-07 12:32:49.361  warn 3 --- [io-40257-exec-5] o.h.engine.jdbc.spi.sqlexceptionhelper   : sql error: 0, sqlstate: 42703 

i know happens. when redeploy using:

./gradlew -pprod bootrepackage -x test heroku deploy:jar --jar build/libs/*war 

it didn't run ./gradlew liquibasediff

how run liquibase diff , apply changes on heroku db?

this seems didn't migrated new field. looks added attribute entity class in domain package, didn't liquibase migration. have 2 option achieve that:

  1. manual migration

just create "yyyymmddhhmmss_add_field_to_my_entity.xml" in src/main/resources/config/liquibase/changelog directory content like

<?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-3.4.xsd">      <changeset id="yyyymmddhhmmss" author="you">         <addcolumn tablename="your_table">             <column name="column_name" type="??" />         </addcolumn>               </changeset> </databasechangelog> 

to make changes happen. do not edit changelog file, been migrated in past!

  1. adding field db, , thenn liquibase:diff here can edit database using tools know in order add column via. sql, , run either ./mvnw liquibase:diff or ./gradlew liquibasediffchangelog generate migration

Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -