Question: In the sample code that you received in this module, the line in main.py: metadata.drop _ all ( bind - engine ) performs: In the

In the sample code that you received in this module, the line in main.py:
metadata.drop_all(bind-engine)
performs:
In the sample code that you received in this module, the line in main.py:
metadata.drop_all(bind-engine)
performs:
Nothing, because you have not connected to the database by this point in the code.
The import statement that brings in metadata from orm_base not only defines that variable, but creates an instance of the metadata class, so that we can use it in main.py without explicitly executing the orm_base.py.
Is going to fail because there is no code in main.py to define the metadata object.
Drops every table from every schema that is inside the database that you are connected to at that point.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!