Examples of DBColumn


Examples of org.databene.jdbacl.model.DBColumn

  @Test
  public void testTypeChangedFromVarcharToInt() {
    // given a column that of which the type changed from int to varchar(1)
    DBTable table1 = new DBTable("tbl");
    DBColumn col1 = createVarcharColumn("col1", table1);
    DBTable table2 = new DBTable("tbl");
    DBColumn col2 = createIntColumn("col1", table2);
    // when performing a comparison
    TableChange tableChange = new TableChange(table1, null);
    new TableColumnComparator(config).compareObjects(col1, col2, tableChange);
    // then the result must be empty
    System.out.println(tableChange);
View Full Code Here

Examples of org.databene.jdbacl.model.DBColumn

    super(constraint, "created " + constraint.getObjectType(), MadUtil.details(constraint));
  }

  public boolean createCheck(SimpleXMLWriter writer) {
    DBTable table = affectedObject.getTable();
    DBColumn column = table.getColumn(affectedObject.getColumnNames()[0]);
    checkName = "NOT NULL " + table.getName() + "." + column.getName();
    CheckDefinitionUtil.renderNotNullCheck(checkName,
        table.getName(), column.getName(),
        Mad4DB.APP_INFO, "not-null", "migration", writer);
    return true;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.