Fix postgres drop

This commit is contained in:
Mike Fitzgerald 2018-10-04 01:09:40 -04:00
parent 4d30c4c87f
commit 0d4f1c0212
1 changed files with 1 additions and 1 deletions

View File

@ -284,7 +284,7 @@ func (p *Postgres) Version() (version int, dirty bool, err error) {
func (p *Postgres) Drop() error {
// select all tables in current schema
query := `SELECT table_name FROM information_schema.tables WHERE table_schema=(SELECT current_schema())`
query := `SELECT table_name FROM information_schema.tables WHERE table_schema=(SELECT current_schema()) AND table_type='BASE TABLE'`
tables, err := p.conn.QueryContext(context.Background(), query)
if err != nil {
return &database.Error{OrigErr: err, Query: []byte(query)}