liquibase / liquipy Goto Github PK
View Code? Open in Web Editor NEWPython wrapper around Liquibase, sans XML.
License: Other
Python wrapper around Liquibase, sans XML.
License: Other
Use python logging instead of print statements; but don't initialize logging -- logging initialization/configuration should be done by the app that's using liquipy
Need to test:
Several instances in https://github.com/GrokSolutions/liquipy/blob/master/liquipy/changeset.py which require a rollback migration. A rollback migration should be optional in liquipy if, for example, as an organization, the user decides to not implement rollbacks and enforce a forward-only migration path.
When I run update multiple times, liquibase complains that those tables already exist: "Table 'metric_template' already exists", etc. and exits with non-zero code. I would have hoped that since liquibase records the tags, it wouldn't execute the same changeset again.
I came across a liquibase discussion http://forum.liquibase.org/topic/why-does-the-change-log-contain-the-file-name that most likely points to a serious bug in liquipy and explains the reason that my changeset is getting executed over and over: it's because liquibase saves the changelog xml file path in the FILENAME column of the DATABASECHANGELOG table and uses that FILENAME value (in addition to ID and MD5SUM) to uniquily identify the changeset. Liquibase assumes that this path never changes. However, liquipy's behavior conflicts with that assumption: liquipy generates the changelog xml file from YML files and the generated XML file is placed in a temporary directory (in any case, those generated files cannot be preserved indefinitely) e.g., /var/folders/kn/xpy4z9wx001_zwmfyzcgxcg40000gp/T/tmpZn5NU_/liquipy_changelog.xml
. Thus, the file path is different each time liquipy-based update is exected, so liquibase keeps re-executing the changesets over and over again.
From the discussion at http://forum.liquibase.org/topic/why-does-the-change-log-contain-the-file-name, it seems that logicalFilePath
may be used by liquipy to solve this problem. liquipy could hard-code logicalFilePath to something like liquipy_changelog.xml
in the generated XML file and never change it.
A lot of fixes since 3.0.4: https://github.com/liquibase/liquibase/blob/master/changelog.txt
Add validation code in inputYamlToChangeSets() to make sure that the same changeset ID is not used in different YMLs. ID re-use should raise an exception.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.