Questions tagged [inspectdb]
55 questions
20
votes
3 answers
Django: using more than one database with inspectdb?
My settings file's database section looks like this:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'C:/Users/Desktop/test.db'
},
'blah':{
'ENGINE': 'django.db.backends.sqlite3',
…

TheEyesHaveIt
- 980
- 5
- 16
- 33
13
votes
5 answers
How do I inspectdb 1 table from database which Contains 1000 tables
I got a schema which Contains 1000 tables,and many of them I don't need,
how can I just inspectdb the just tables that I need?

liamlee
- 311
- 2
- 3
- 10
5
votes
5 answers
How do I run inspectdb against different schemas in oracle?
I want to run inspectdb against an Oracle database. The user account that I use is a read only user that owns 0 tables. It, however, has access to the schema that contains all the tables. How do I specify a schema when using inspectdb?
My command,…

Andy
- 49,085
- 60
- 166
- 233
3
votes
1 answer
Django keeps migrating the same foreign key
I am importing an existing database into it's own Django project. I have generated the initial models from the database, via inspectdb, and am enabling Django to control each table one at a time by commenting the managed=False lines in the table…

Carel
- 3,289
- 2
- 27
- 44
2
votes
2 answers
Django - inspectdb - the "models.FileField" are displayed as "models.CharField"
For some reason i want to check the Db as created with Django . I run command = python manage.py inspectdb > inspectdb.txt
I get to see = models.CharField in place of the expected = models.FileField , whereas the models.py has the correct…

Rohit Dhankar
- 1,574
- 18
- 25
2
votes
0 answers
How to integrate an existing neo4j database via neomodel in django?
I'm relatively new to neo4j and want to integrate an existing database in django for python with neomodel (django-neomodel).
Can the corresponding node models be derived from the existing neo4j database? Like inspectdb for relational databases in…

Max
- 21
- 3
2
votes
1 answer
Django dumpdata unable to serialize existing column
I'm getting bit trying to dumpdata from a legacy db i've recently did a reverse engineering using django's inspectdb...
Other than this every query works fine. In MySQL workbench the column exists.
But when trying to export the data I…

tutuca
- 3,444
- 6
- 32
- 54
2
votes
1 answer
Django inspectdb 'unique_together' refers to the non-existent field (2015)
I'm using Django with MySQL and having a problem after using 'inspectdb' command to create my models.py file.
DDL:
CREATE TABLE YDB_Collects (
COriginal_Data_Type_ID VARCHAR(16) NOT NULL,
CTask_Name VARCHAR(16) NOT NULL,
PRIMARY KEY…

GarlicDipping
- 45
- 6
2
votes
1 answer
Django's inspectdb doesn't do ManyToManyField
So I just tested one thing, making the following tables.
# Dump of table driverclass
# ------------------------------------------------------------
CREATE TABLE `driverclass` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(20)…

Martol1ni
- 4,684
- 2
- 29
- 39
1
vote
2 answers
Django - Inspectdb support this kind of database tables?
I have tested to "inspectdb" but I think my schema is to complex, for
example... for the table "tdir_files_context" (djangoinspectdb.JPG
"image in attachment") I got this model:
class TdirFilesContext(models.Model):
id_category =…

André
- 24,706
- 43
- 121
- 178
1
vote
0 answers
Django inspectdb for Oracle
I am doing a project and need retrieve tables/models from a Oracle database(version 19c). So I am trying to use Django ‘inspectdb’ to do this.
– my settings.py looks like:
import…

Joanna
- 81
- 1
- 6
1
vote
4 answers
Django Inspectdb on MSSql error while trying to inspect a table
I've got this error while trying inspecting a MsSql database:
# This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
# * Rearrange models' order
# * Make sure each model has one field with…

Ivan El Mochilero
- 81
- 6
1
vote
0 answers
Django DecimalField max_digits and decimal_places not explicitly known
I am working on adding a Django model where there are a number of fields that I want created as a DecimalField, but I don't know the max_digits or decimal_places for each of these columns. I am using a postgres database; the table structure comes…

Rory-R-Reyes
- 31
- 3
1
vote
0 answers
How can we link third party databases (specifically MS Access) to Django for the inspectdb utility?
I want to just automate model creation and also just double check against my manual models using Django's inspectdb utility. However, the database I want to observe is Microsoft Access and it's not very clear how I can do this properly. There is a…

lcrxdch
- 11
- 1
1
vote
2 answers
django oracle inspectdb failure
i'm using django 1.3. i have an existing oracle database (10g) i would like to build Model's from using inspectdb.
'db': {
'ENGINE': 'django.db.backends.oracle',
'NAME': 'DBNAME',
'USER': 'me',
'PASSWORD': 'something',
}
so when run…

yee379
- 6,498
- 10
- 56
- 101