Indexes are not really constraints. Primary key dropping is its own thing, too.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2519 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -134,15 +134,15 @@ public abstract class BaseLiaison implements DatabaseLiaison
|
|||||||
// from DatabaseLiaison
|
// from DatabaseLiaison
|
||||||
public void dropIndex (Connection conn, String table, String index) throws SQLException
|
public void dropIndex (Connection conn, String table, String index) throws SQLException
|
||||||
{
|
{
|
||||||
executeQuery(conn, "ALTER TABLE " + tableSQL(table) +
|
executeQuery(conn, "DROP INDEX " + columnSQL(index));
|
||||||
" DROP CONSTRAINT " + columnSQL(index));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// from DatabaseLiaison
|
// from DatabaseLiaison
|
||||||
public void dropPrimaryKey (Connection conn, String table, String pkName)
|
public void dropPrimaryKey (Connection conn, String table, String pkName)
|
||||||
throws SQLException
|
throws SQLException
|
||||||
{
|
{
|
||||||
dropIndex(conn, table, pkName);
|
executeQuery(conn, "ALTER TABLE " + tableSQL(table) +
|
||||||
|
" DROP CONSTRAINT " + columnSQL(pkName));
|
||||||
}
|
}
|
||||||
|
|
||||||
// from DatabaseLiaison
|
// from DatabaseLiaison
|
||||||
|
|||||||
Reference in New Issue
Block a user