H2 Remark support for columns and tables.

Hello,


I stumbled across a lack of support for remarks (comments) when dealing with H2 databases.  H2 supports the SQL standard COMMENT ON… syntax.  I had a look in the source code and it seemed like low hanging fruit, so I sucessfully applied the following patch:

  1. ---
  2.  .../java/liquibase/sqlgenerator/core/SetColumnRemarksGenerator.java   | 4 +++-
  3.  .../java/liquibase/sqlgenerator/core/SetTableRemarksGenerator.java    | 3 ++-
  4.  2 files changed, 5 insertions(+), 2 deletions(-)

  5. diff --git a/liquibase-core/src/main/java/liquibase/sqlgenerator/core/SetColumnRemarksGenerator.java b/liquibase-core/src/main/java/liquibase/sqlgenerator/core/SetColumnRemarksGenerator.java
  6. index ec76acf..3661150 100644
  7. --- a/liquibase-core/src/main/java/liquibase/sqlgenerator/core/SetColumnRemarksGenerator.java
  8. +++ b/liquibase-core/src/main/java/liquibase/sqlgenerator/core/SetColumnRemarksGenerator.java
  9. @@ -4,6 +4,7 @@ import liquibase.database.Database;
  10.  import liquibase.database.core.DB2Database;
  11.  import liquibase.database.core.OracleDatabase;
  12.  import liquibase.database.core.PostgresDatabase;
  13. +import liquibase.database.core.H2Database;
  14.  import liquibase.exception.ValidationErrors;
  15.  import liquibase.sql.Sql;
  16.  import liquibase.sql.UnparsedSql;
  17. @@ -20,7 +21,8 @@ public class SetColumnRemarksGenerator extends AbstractSqlGenerator<SetColumnRem
  18.  
  19.   @Override
  20. -- 
... that seemed to do the trick for me.  I don't really have the time to figure out what side effects this might have, nor did I write any tests.  If the change is not problematic, I would be thankful if it made its way into a future release so I can avoid using my fork.


Thanks, 

Sam