-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Disclaimer: this might be a really stupid question, I actually know very little about schemas and mssql.
I am running python manage.py inspectdb
on a mssql database that contains multiple schemas.
These are a way of separating topics inside the db (I think?).
E.g. there might be a schema called users
that contains the tables users.User
, users.Post
, users.Friendships
and a second schema called games
that contains other tables.
When I run inspectdb
the output is empty because there are no tables in the main scheme dbo
.
I changed
sql = 'SELECT TABLE_NAME, TABLE_TYPE FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = SCHEMA_NAME()' |
sql = "SELECT TABLE_NAME, TABLE_TYPE FROM INFORMATION_SCHEMA.TABLES;"
and now all tables are created. Only the schemes names are not displayed correctly in db_table
. It says 'User' instead of 'users.User', but that's fixed fast.
So my question: Why did you choose to only inspect tables in dbo
? Did I miss something in the settings? Is creating multiple schemes something very unusual?