DB Access Module for MySQL User’s Guide : Chapter 2 Technical Information : Table and Column Constraint Limitations
Table and Column Constraint Limitations
 
Identity Constraints
The DB Access Module for MySQL supports identity columns with the keyword AUTO_INCREMENT, but does not support any identity attributes. The module ignores any identity attributes set on RWDBIdentityConstraint while creating tables.
When fetching a table schema, an identity column will have a valid RWDBIdentityConstraint object, but it will not have any attributes set on it.
The MySQL database requires that an AUTO_INCREMENT column be included in the table's primary key; further, it does not support a decimal type column to be defined as an AUTO_INCREMENT column. SourcePro DB does not enforce these requirements in any way nor does it implicitly include an AUTO_INCREMENT column in the table's primary key. The database server will return an error if these requirements are not met.
For examples creating identity constraints, see Section 4.5.2.3, “Identity Column Constraints,” in the DB Interface Module User's Guide.
Check Constraints
The MySQL database does not support check constraints, so the DB Access Module for MySQL cannot support it.
When creating tables, if check constraints are supplied in the RWDBSchema object, SourcePro DB includes them in the CREATE TABLE SQL, but they will be silently ignored by MySQL. Because MySQL does not support check constraints, the DB Access Module for MySQL also does not support fetching them.
Adding or Dropping Constraints
To drop a constraint, the DB Access Module for MySQL requires the constraint type as well as the constraint name. To drop a constraint, use the RWDBTable::dropConstraint() method that takes a constraint object rather than a constraint name.
NOTE >> Because the module does not support check constraints, adding and dropping check constraints using the RWDBTable::addConstraint() and RWDBTable::dropConstraint() API is not supported.