* [ 1707611 ] Column synchronization for mandatory columns doesn't work

- Fixed a bug in previous commit.
This commit is contained in:
Heng Sin Low 2007-04-26 01:09:19 +00:00
parent 7cd703ce8e
commit 2d7ef6d21e
2 changed files with 6 additions and 1 deletions

View File

@ -1039,7 +1039,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 {
}
else if ( rest.toUpperCase().indexOf("NULL") >= 0) {
DDL += sqlStatement.substring(0, begin_col - action.length())
+ " ALTER COLUMN " + column + " SET " + rest.trim()
+ " ALTER COLUMN " + column + " DROP NOT NULL"
+ ";";
}

View File

@ -34,6 +34,11 @@ public final class Convert_PostgreSQLTest {
r = convert.convert(sql);
verify(sql, r, sqe);
sql = "ALTER TABLE Test MODIFY T_Integer NUMBER(10) NULL";
sqe = "ALTER TABLE Test ALTER COLUMN T_Integer TYPE NUMERIC(10); ALTER TABLE Test ALTER COLUMN T_Integer DROP NOT NULL;";
r = convert.convert(sql);
verify(sql, r, sqe);
// Convert.recoverQuotedStrings() error on strings with "<-->" - teo_sarca [ 1705768 ]
// http://sourceforge.net/tracker/index.php?func=detail&aid=1705768&group_id=176962&atid=879332
sql = "SELECT 'Partner <--> Organization', 's2\\$', 's3' FROM DUAL";