Package org.databene.jdbacl.model

Examples of org.databene.jdbacl.model.DBCheckConstraint


  @Test
  public void testCheckCreated() {
    // given a table to which a check constraint was added
    DBTable table1 = createTableWithColumns("tbl", 2);
    DBTable table2 = createTableWithColumns("tbl", 2);
    new DBCheckConstraint("check1", false, table2, "col1 > 0");
    SchemaChange schemaChange = new SchemaChange(config);
    // when comparing the tables
    new TableComparator(config).compareObjects(table1, table2, schemaChange);
    // then the result must be a foreign key creation
    System.out.println(schemaChange);
View Full Code Here


 
  @Test
  public void testCheckDeleted() {
    // given a table to which a check constraint was added
    DBTable table1 = createTableWithColumns("tbl", 2);
    new DBCheckConstraint("check1", false, table1, "col1 > 0");
    DBTable table2 = createTableWithColumns("tbl", 2);
    SchemaChange schemaChange = new SchemaChange(config);
    // when comparing the tables
    new TableComparator(config).compareObjects(table1, table2, schemaChange);
    // then the result must be a foreign key creation
View Full Code Here

TOP

Related Classes of org.databene.jdbacl.model.DBCheckConstraint

Copyright © 2018 www.massapicom. 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.