Clear postgresql and alembic and start from scratch

Everything that I learned about it through a search was either incorrect or incomplete. So how am I:

  • delete everything in my postgresql database
  • delete all my alembic checks
  • make my database 100% new
+4
source share
2 answers

This works for me:

1) Access the session, just like you did session.create_all, do session.drop_all.

2) Delete the migration files generated by alembic.

3) Run session.create_all and the initial migration.

+2
source

I don't know how to tinker with alembic, but for the database you can just go into the SQL console and use DROP DATABASE foo.

, ? , postgres .

+1

All Articles