当前位置: 首页>>代码示例>>Java>>正文


Java ChangeLogSerializer类代码示例

本文整理汇总了Java中liquibase.serializer.ChangeLogSerializer的典型用法代码示例。如果您正苦于以下问题:Java ChangeLogSerializer类的具体用法?Java ChangeLogSerializer怎么用?Java ChangeLogSerializer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ChangeLogSerializer类属于liquibase.serializer包,在下文中一共展示了ChangeLogSerializer类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testChangeSets

import liquibase.serializer.ChangeLogSerializer; //导入依赖的package包/类
@Test
public void testChangeSets() throws Throwable {
    String unitName = "StorageTestMasterOnly";
    String changeLogPath = "META-INF/changelog/changelog-master.xml";

    List<ChangeSet> changeSets = ChangeSetUtils.computeChangeSets(unitName, changeLogPath);
    
    if (changeSets.size() > 0) {
        ChangeLogSerializer changeLogSerializer = new XMLChangeLogSerializer();
        changeLogSerializer.write(changeSets, System.out);
        System.out.flush();
        Assert.fail("There are data model changes which were not versioned!");
    }
}
 
开发者ID:Blazebit,项目名称:blaze-storage,代码行数:15,代码来源:LiquibaseChangeSetTest.java

示例2: printChangeLog

import liquibase.serializer.ChangeLogSerializer; //导入依赖的package包/类
/**
 * Prints changeLog that would bring the target database to be the same as
 * the reference database
 */
public void printChangeLog(PrintStream out, Database targetDatabase,
		ChangeLogSerializer changeLogSerializer)
		throws ParserConfigurationException,
		IOException, DatabaseException {
	List<ChangeSet> changeSets = new ArrayList<ChangeSet>();
	addMissingTableChanges(changeSets, targetDatabase);
	addMissingColumnChanges(changeSets, targetDatabase);
	addChangedColumnChanges(changeSets);
	addMissingPrimaryKeyChanges(changeSets);
	addUnexpectedPrimaryKeyChanges(changeSets);
       addUnexpectedForeignKeyChanges(changeSets);
	addMissingUniqueConstraintChanges(changeSets);
	addUnexpectedUniqueConstraintChanges(changeSets);

	if (diffData) {
		addInsertDataChanges(changeSets, dataDir);
	}

	addMissingForeignKeyChanges(changeSets);
	addUnexpectedIndexChanges(changeSets);
       addMissingIndexChanges(changeSets);
	addUnexpectedColumnChanges(changeSets);
	addMissingSequenceChanges(changeSets);
	addUnexpectedSequenceChanges(changeSets);
	addMissingViewChanges(changeSets);
	addUnexpectedViewChanges(changeSets);
	addChangedViewChanges(changeSets);
	addUnexpectedTableChanges(changeSets);

	changeLogSerializer.write(changeSets, out);

	out.flush();
}
 
开发者ID:hongliangpan,项目名称:manydesigns.cn,代码行数:38,代码来源:DiffResult.java


注:本文中的liquibase.serializer.ChangeLogSerializer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。