Skip to content

Commit 485def0

Browse files
Prometheus2677FPiety0521
authored andcommitted
Merge pull request #110 from MikeFitzgerald/master
Fix postgres drop
2 parents 227eed2 + 00e84b1 commit 485def0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

database/postgres/postgres.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ func (p *Postgres) Version() (version int, dirty bool, err error) {
284284

285285
func (p *Postgres) Drop() error {
286286
// select all tables in current schema
287-
query := `SELECT table_name FROM information_schema.tables WHERE table_schema=(SELECT current_schema())`
287+
query := `SELECT table_name FROM information_schema.tables WHERE table_schema=(SELECT current_schema()) AND table_type='BASE TABLE'`
288288
tables, err := p.conn.QueryContext(context.Background(), query)
289289
if err != nil {
290290
return &database.Error{OrigErr: err, Query: []byte(query)}

0 commit comments

Comments
 (0)