void removeColumn ( String schema , String table , String column ) { StringBuilder sql = new StringBuilder ( "ALTER TABLE " ) ; sql . append ( sqlgGraph . getSqlDialect ( ) . maybeWrapInQoutes ( schema ) ) ; sql . append ( "." ) ; sql . append ( sqlgGraph . getSqlDialect ( ) . maybeWrapInQoutes ( table ) ) ; sql . append ( " DROP COLUMN IF EXISTS " ) ; sql . append ( sqlgGraph . getSqlDialect ( ) . maybeWrapInQoutes ( column ) ) ; if ( sqlgGraph . getSqlDialect ( ) . supportsCascade ( ) ) { sql . append ( " CASCADE" ) ; } if ( sqlgGraph . getSqlDialect ( ) . needsSemicolon ( ) ) { sql . append ( ";" ) ; } if ( logger . isDebugEnabled ( ) ) { logger . debug ( sql . toString ( ) ) ; } Connection conn = sqlgGraph . tx ( ) . getConnection ( ) ; try ( Statement stmt = conn . createStatement ( ) ) { stmt . execute ( sql . toString ( ) ) ; } catch ( SQLException e ) { throw new RuntimeException ( e ) ; } }
remove a column from the table