liquibase

Create column of type double precision[] with liquibase

断了今生、忘了曾经 提交于 2019-12-12 12:12:25
问题 How to create column of type double precision[] (array of doubles) with liquibase in postgresql database? <changeSet id="add t_name table"> <createTable tableName="t_name"> ... <column name="doubleArray" type="???"/> ... </createTable> </changeSet> Google didn't help, please, if someone knows a solution, I will be very appreciative. 回答1: I finally found the answer with help of my colleague. It seems that liquibase don't know such types, so we need to modify sql query manually: <createTable

Liquibase generateChangeLog Failed: Java heap space

社会主义新天地 提交于 2019-12-12 12:02:03
问题 When I try to generate SQL data from a DB2 database, I am getting Java Heap space issue. There are around 25 tables with approx 1000 records. I use the below scripts in generating the changeset data: C:\liquibase-3.0.2-bin>liquibase --driver=com.ibm.db2.jcc.DB2Driver \ --classpath="C:\db2jcc.jar" \ --changeLogFile="C:\Liquibase Release\liqui_MYDB_MYSCHEMA_Data.xml" \ --url="jdbc:db2://__ip__here__:9008/MYDB" \ --username="user" \ --password="12345" \ --defaultSchemaName="MYSCHEMA" \ -

Liquibase diffChangeLog against a Hibernate mapping definition

点点圈 提交于 2019-12-12 10:17:20
问题 This question is related to "Hibernate using JPA (annotated Entities) and liquibase". I was actually wondering what to expect when doing a Liquibase diff against a Hibernate mapping definition . What it seems to produce: A liquibase changelog that migrates the state of my hibernate mappings to the current image of the database. What I was hoping for: A liquibase changelog that migrates the existing (old) database to reflect the changes in my (new) hibernate mappings. Am I expecting the wrong

Liquibase preconditions: How do I check for a column being non-nullable?

痞子三分冷 提交于 2019-12-12 09:37:42
问题 I have a db upgrade script to remove the non-null constraint on a column. I want to do a precondition check, and call ALTER TABLE only when it is non-null. The master.xml script is a progressive one where I keep adding scripts and the entire thing runs everytime. After the first time my Alter Table script has run, I do not want it to be run again. Couldn't find a predefined precondition for this, and could not write an sqlcheck either. 回答1: Can be done with sqlCheck. For MySql <preConditions

How to define in Liquibase a set of default columns, def. PKs, def. indexes, def. values for table creation?

霸气de小男生 提交于 2019-12-12 08:57:16
问题 I just looking around to reduce effort and errors on table creation on liquibase. Is it possible to create a set of default colums for tables? columns: int ID varchar UUID timestamp createdTs timestamp updatedTs int lockVersion constraints ID not NULL and with autogenerated key (as primary key) UUID not NULL createdTS not NULL with default CURRENT_TIMESTAMP updatedTS not NULL with default CURRENT_TIMESTAMP lockVersion not NULL index ID UUID so for example: genericTable.xml <changeSet author=

How to extend Liquibase to generate change logs with stored procedures, functions and triggers?

点点圈 提交于 2019-12-12 08:05:20
问题 Currently Liquibase has some limitations when you try to generate change logs on an existing database. It does not export the following types of objects: Stored procedures, functions, packages Triggers Types Reference: http://www.liquibase.org/documentation/generating_changelogs.html As far as I understand I need to develop my own liquibase.snapshot.SnapshotGenerator implementation. I know how to obtain these types of objects from Oracle but I'm a bit lost on how to implement such interface

Liquibase Command Line create diff changelog in sql

痞子三分冷 提交于 2019-12-12 07:16:02
问题 I actually use Liquibase on windows in command lines, and I try to create an sql script that represent the diff between two databases. Unfortunatly I only get xml file in return. Can you help me ? My command line : liquidbase.bat --driver=com.mysql.jdbc.Driver --url=jdbc:mysql://localhost:3306/base1 --username=root diffChangeLog --referenceUrl=jdbc:mysql://localhost:3306/base2 --referenceUsername=root > test.sql I've seen this similar question in an other forum but he didn't got a good answer

Migrate LiquibaseChangeLog entries

99封情书 提交于 2019-12-12 04:53:59
问题 We're using Liquibase to handle our DB Schema changes. As we already have quite a large set of ChangeLogs distributed over multiple files, arranged in a complex folder structure, there sometimes rises the need or the desire to make some refactorings that would influence the meta information in the DatabaseChangeLog table. What is the recommendation for such refactorings? Can I use Liquibase itself to update the DatabaseChangeLog entries or will I run into caching issues? A simple example to

Difference in Liquibase Maven/CLI parameters

只愿长相守 提交于 2019-12-12 04:12:15
问题 There are a lot of useful parameters (for example, changelogCatalogName) for Maven update task: http://www.liquibase.org/documentation/maven/maven_update.html But they are not mentioned in CLI page for liquibase update: http://www.liquibase.org/documentation/command_line.html Is it possible to pass these parameters? Thanks! 回答1: You can also use liquibase --help to return command line options as well, there may be some on there that were missed in the docs. I am working on improving

Boxfuse with Jhipster Deployment

被刻印的时光 ゝ 提交于 2019-12-12 04:05:19
问题 When upgrading my jhipster app to version 2.0 from 1.0 using Boxfuse , I am getting Liquibase checksum invalid error . However I have changed nothing in the database . Also, this happens only in prod mode and app runs fine in dev mode. How can I resolve this issue . Thanks . 回答1: I'm not familiar with how jhipster uses Liquibase, but basically what you need to do is get liquibase to run the changelogsync command to get the changeset checksums updated. 来源: https://stackoverflow.com/questions