test_class.file: data/db/src/test/java/leap/db/change/ColumnDefinitionChangeTest.java
test_class.identifier: ColumnDefinitionChangeTest
test_class.superclass: extends DbTestCase
test_case.body: @Test
  	@Contextual
  	public void testColumnUniquePropertyChange() {
  		DbColumnBuilder col = DbColumnBuilder.varchar("col1", 100);
  
  		DbTableBuilder table = new DbTableBuilder("test_unique_change")
  								.addColumn(col);
  		
  		//create table with non-unique column
  		db.cmdCreateTable(table.build()).execute();
  
  		//change the column's unique property to true
  		col.setUnique(true);
  		
  		//compares table
  		DbTable targetTable = db.getMetadata().tryGetTable(table.getTableName());
  		assertNotNull(targetTable);
  		
  		SchemaChanges changes = db.getComparator().compareTable(table.build(), targetTable);
  		assertEquals(1, changes.size());
  		assertTrue(changes.get(0) instanceof ColumnDefinitionChange);
  
  		ColumnDefinitionChange change = (ColumnDefinitionChange)changes.get(0);
  		assertTrue(change.isUniqueChanged());
  		
  		//apply the changes
  		changes.applyChanges();
  		
  		targetTable = db.getMetadata().tryGetTable(table.getTableName());
  		changes = db.getComparator().compareTable(table.build(), targetTable);
  		assertNull(changes.firstOrNull(ColumnDefinitionChange.class));
  		
  		//drop column
  		db.cmdDropTable(table.getTableName()).execute();
  	}
test_case.class_method_signature: ColumnDefinitionChangeTest.testColumnUniquePropertyChange()
test_case.full_signature: @Test @Contextual public void testColumnUniquePropertyChange()
test_case.identifier: testColumnUniquePropertyChange
test_case.invocations: varchar addColumn execute cmdCreateTable build setUnique tryGetTable getMetadata getTableName assertNotNull compareTable getComparator build assertEquals size assertTrue get get assertTrue isUniqueChanged applyChanges tryGetTable getMetadata getTableName compareTable getComparator build assertNull firstOrNull execute cmdDropTable getTableName
test_case.modifiers: @Test @Contextual public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testColumnUniquePropertyChange()
focal_class.declarator: propertyChanges
focal_class.modifier: protected final
focal_class.original_string: protected final List<ColumnPropertyChange> propertyChanges;
focal_class.type: List<ColumnPropertyChange>
focal_class.var_name: propertyChanges
focal_class.file: data/db/src/main/java/leap/db/change/ColumnDefinitionChange.java
focal_class.identifier: ColumnDefinitionChange
focal_class.class_method_signature: ColumnDefinitionChange.ColumnDefinitionChange(DbTable table, DbColumn oldColumn, DbColumn newColumn,List<ColumnPropertyChange> propertyChanges)
focal_class.full_signature: public  ColumnDefinitionChange(DbTable table, DbColumn oldColumn, DbColumn newColumn,List<ColumnPropertyChange> propertyChanges)
focal_class.identifier: ColumnDefinitionChange
focal_class.modifiers: public
focal_class.parameters: (DbTable table, DbColumn oldColumn, DbColumn newColumn,List<ColumnPropertyChange> propertyChanges)
focal_class.signature:  ColumnDefinitionChange(DbTable table, DbColumn oldColumn, DbColumn newColumn,List<ColumnPropertyChange> propertyChanges)
focal_class.class_method_signature: ColumnDefinitionChange.getChangeType()
focal_class.full_signature: @Override public SchemaChangeType getChangeType()
focal_class.identifier: getChangeType
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: SchemaChangeType
focal_class.signature: SchemaChangeType getChangeType()
focal_class.class_method_signature: ColumnDefinitionChange.toJson(JsonWriter writer)
focal_class.full_signature: @Override public void toJson(JsonWriter writer)
focal_class.identifier: toJson
focal_class.modifiers: @Override public
focal_class.parameters: (JsonWriter writer)
focal_class.return: void
focal_class.signature: void toJson(JsonWriter writer)
focal_class.class_method_signature: ColumnDefinitionChange.getPropertyChanges()
focal_class.full_signature: public @Immutable List<ColumnPropertyChange> getPropertyChanges()
focal_class.identifier: getPropertyChanges
focal_class.modifiers: public @Immutable
focal_class.parameters: ()
focal_class.return: List<ColumnPropertyChange>
focal_class.signature: List<ColumnPropertyChange> getPropertyChanges()
focal_class.class_method_signature: ColumnDefinitionChange.isSizeChanged()
focal_class.full_signature: public boolean isSizeChanged()
focal_class.identifier: isSizeChanged
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isSizeChanged()
focal_class.class_method_signature: ColumnDefinitionChange.isTypeChanged()
focal_class.full_signature: public boolean isTypeChanged()
focal_class.identifier: isTypeChanged
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isTypeChanged()
focal_class.class_method_signature: ColumnDefinitionChange.isNullableChanged()
focal_class.full_signature: public boolean isNullableChanged()
focal_class.identifier: isNullableChanged
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isNullableChanged()
focal_class.class_method_signature: ColumnDefinitionChange.isUniqueChanged()
focal_class.full_signature: public boolean isUniqueChanged()
focal_class.identifier: isUniqueChanged
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isUniqueChanged()
focal_class.class_method_signature: ColumnDefinitionChange.isDefaultChanged()
focal_class.full_signature: public boolean isDefaultChanged()
focal_class.identifier: isDefaultChanged
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isDefaultChanged()
focal_class.class_method_signature: ColumnDefinitionChange.isCommentChanged()
focal_class.full_signature: public boolean isCommentChanged()
focal_class.identifier: isCommentChanged
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isCommentChanged()
focal_class.superclass: extends ColumnChangeBase
focal_method.body: public boolean isUniqueChanged(){
  		return Iterables.any(propertyChanges, PropertyChange.nameEquals(ColumnPropertyChange.UNIQUE));
  	}
focal_method.class_method_signature: ColumnDefinitionChange.isUniqueChanged()
focal_method.full_signature: public boolean isUniqueChanged()
focal_method.identifier: isUniqueChanged
focal_method.invocations: any nameEquals
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: boolean
focal_method.signature: boolean isUniqueChanged()