public String getChangeTypeName() { return this.getObjectKey().getChangeTypeName(); }
public String getChangeTypeName() { return this.getObjectKey().getChangeTypeName(); }
/** * This getDbObjectKey() string concatenation is a kludge until we refactor the DB object stuff itself out to its * own object */ public String getDbObjectKey() { return this.getObjectKey().getSchema() + ":" + this.getObjectName(); }
/** * This getDbObjectKey() string concatenation is a kludge until we refactor the DB object stuff itself out to its * own object */ public String getDbObjectKey() { return this.getObjectKey().getSchema() + ":" + this.getObjectName(); }
@Test public void testDbChange() { ChangeInput change = new TableChangeParser(new EmptyContentHashStrategy(), getChangeType) .value(tableChangeType, null, "//// CHANGE name=chng5Rollback applyGrants=true INACTIVE baselinedChanges=\"a,b,c\" \nmychange\n\n// ROLLBACK-IF-ALREADY-DEPLOYED\nmyrollbackcommand\n", objectName , "schem", null).get(0); assertEquals("schem", change.getObjectKey().getSchema()); assertEquals("chng5Rollback", change.getChangeKey().getChangeName()); assertEquals("mychange\n", change.getContent()); assertEquals("mychan", change.getContentHash()); assertEquals("myrollbackcommand", change.getRollbackIfAlreadyDeployedContent()); assertEquals(UnifiedSet.newSetWith("a", "b", "c"), change.getBaselinedChanges().toSet()); assertFalse(change.isActive()); assertTrue(change.getApplyGrants()); }
@Test public void testDbChange2DiffValues() { ChangeInput change = new TableChangeParser(new EmptyContentHashStrategy(), getChangeType) .value(tableChangeType, null, "//// CHANGE name=chng5Rollback INACTIVE baselinedChanges=\"a,b,c\" \nmychange\n\n// ROLLBACK-IF-ALREADY-DEPLOYED\nmyrollbackcommand\n", objectName , "schem", null).get(0); assertEquals("schem", change.getObjectKey().getSchema()); assertEquals("chng5Rollback", change.getChangeKey().getChangeName()); assertEquals("mychange\n", change.getContent()); assertEquals("mychan", change.getContentHash()); assertEquals("myrollbackcommand", change.getRollbackIfAlreadyDeployedContent()); assertEquals(UnifiedSet.newSetWith("a", "b", "c"), change.getBaselinedChanges().toSet()); assertFalse(change.isActive()); assertNull(change.getApplyGrants()); }