mirror of https://github.com/status-im/migrate.git
Fix postgres drop
This commit is contained in:
parent
4d30c4c87f
commit
0d4f1c0212
|
@ -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)}
|
||||
|
|
Loading…
Reference in New Issue