Search in sources :

Example 1 with PostgreSQLTable

use of org.flywaydb.core.internal.dbsupport.postgresql.PostgreSQLTable in project flyway by flyway.

the class VerticaSchema method doAllTables.

@Override
protected Table[] doAllTables() throws SQLException {
    List<String> tableNames = jdbcTemplate.queryForStringList(//Search for all the table names
    "SELECT t.table_name FROM v_catalog.all_tables t" + //in this schema
    " WHERE schema_name=?" + //Querying for 'TABLE' in Vertica will exclude views, system tables and temporary tables
    " and table_type =  'TABLE'", name);
    //Vertica will drop projections, when using cascade, but it will not drop views.
    Table[] tables = new Table[tableNames.size()];
    for (int i = 0; i < tableNames.size(); i++) {
        tables[i] = new PostgreSQLTable(jdbcTemplate, dbSupport, this, tableNames.get(i));
    }
    return tables;
}
Also used : PostgreSQLTable(org.flywaydb.core.internal.dbsupport.postgresql.PostgreSQLTable) Table(org.flywaydb.core.internal.dbsupport.Table) PostgreSQLTable(org.flywaydb.core.internal.dbsupport.postgresql.PostgreSQLTable)

Aggregations

Table (org.flywaydb.core.internal.dbsupport.Table)1 PostgreSQLTable (org.flywaydb.core.internal.dbsupport.postgresql.PostgreSQLTable)1