'Migrate down in golang migrate does not drop tables
I have the following down script named 000001_init_schema.down.sql
DROP TABLE IF EXISTS entries;
DROP TABLE IF EXISTS transfers;
DROP TABLE IF EXISTS accounts;
When I run
migrate -path db/migrations --database "postgresql://root:secret@localhost:5432/accountsdb?sslmode=disable" -verbose down
▶ make migratedown
migrate -path db/migrations --database "postgresql://root:secret@localhost:5432/accountsdb?sslmode=disable" -verbose down
2022/02/12 21:43:19 Are you sure you want to apply all down migrations? [y/N]
y
2022/02/12 21:43:21 Applying all down migrations
2022/02/12 21:43:21 no change
2022/02/12 21:43:21 Finished after 2.242449209s
2022/02/12 21:43:21 Closing source and database
nothing changes.
why is that?
My corresponding up script works as expected.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
