2

I'm using SqlAlchemy with PostgreSql. I'm creating lots of sequences. I'm trying to drop all the tables and sequences. But couldn't drop sequences. How can I drop all the sequences in SqlAlchemy?

4

1 回答 1

4

I've found the solution.

engine = create_engine('postgresql://user:password@localhost:5432/test', echo=True)
Base.metadata.drop_all(bind=engine)

It drops all the tables including sequences.

于 2013-09-18T06:56:01.060 回答