-
-
Save kvnramirez/2cd391714803bd0378b57e0d48ff5b13 to your computer and use it in GitHub Desktop.
[django] check if db table exists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def db_table_exists(table_name): | |
return table_name in connection.introspection.table_names() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment