operational error no such column: accounts_businessownercreate.id

24 views
Skip to first unread message

Kean

unread,
Aug 14, 2019, 1:32:11 PM8/14/19
to Django users
Hi,

I'm new to django and python.

I created a database, but Every time I access my database on the backend, I get the no such column exists error.
I cant understand how a column i didn't create, exists in the database, and is preventing dbase management.

I have attached s.shot of the error.

Im using the sqlite3 db with version django version 2.2.3

Please can anyone help with ID, root cause and fix?

Best,

Kean


Screen Shot 2019-08-14 at 18.24.35.png

Tosin Ayoola

unread,
Aug 14, 2019, 2:12:50 PM8/14/19
to django...@googlegroups.com
Did u do d python manage.py makemigrations, python manage.py migrate, that d main cause of diz type of errors 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8c5e159a-a6b2-4cfb-acf9-5019a1a599ae%40googlegroups.com.

Kean

unread,
Aug 14, 2019, 2:15:47 PM8/14/19
to django...@googlegroups.com
Hi,

Thanks for response. I have tried to migrate several times. 
shell response from django is ‘No migrations to apply”

Not sure if this is a bug in Django?

Best,

K


To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHLKn72oj4MoXGCHpZj6S6QijMb7ixx-MREszxD8XHo3hptraA%40mail.gmail.com.

RONAK JAIN

unread,
Aug 14, 2019, 2:19:15 PM8/14/19
to django...@googlegroups.com
Hey, could you delete your migrations files and again try to create makemigrations and migrate...



Thanks 

On Wed, Aug 14, 2019 at 11:45 PM Kean <kea...@gmail.com> wrote:
Hi,

Thanks for response. I have tried to migrate several times. 
shell response from django is ‘No migrations to apply”

Not sure if this is a bug in Django?

Best,

K

On 14 Aug 2019, at 19:12, Tosin Ayoola <tosina...@gmail.com> wrote:

Did u do d python manage.py makemigrations, python manage.py migrate, that d main cause of diz type of errors 
On Aug 14, 2019 18:32, "Kean" <kea...@gmail.com> wrote:
Hi,

I'm new to django and python.

I created a database, but Every time I access my database on the backend, I get the no such column exists error.
I cant understand how a column i didn't create, exists in the database, and is preventing dbase management.

I have attached s.shot of the error.

Im using the sqlite3 db with version django version 2.2.3

Please can anyone help with ID, root cause and fix?

Best,

Kean



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8c5e159a-a6b2-4cfb-acf9-5019a1a599ae%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHLKn72oj4MoXGCHpZj6S6QijMb7ixx-MREszxD8XHo3hptraA%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

RONAK JAIN

unread,
Aug 14, 2019, 2:21:04 PM8/14/19
to django...@googlegroups.com
If you will not get please let me know, I will help you on Teamviewer...

Kean

unread,
Aug 14, 2019, 2:26:48 PM8/14/19
to django...@googlegroups.com
Hi,

It seems when django runs the make migrations procedure, if there are no migrations to make,
it does not create a migrate file, I’m not sure if this is because there is nothing to migrate, 
subsequently nothing to report, so no folder or reports get generated.

this is big assumption of mine, i am new to django, it really needs a django expert to weigh in..

Best,

K

Tosin Ayoola

unread,
Aug 14, 2019, 2:36:07 PM8/14/19
to django...@googlegroups.com
Wat I normally do is 2 delete my sqlite.db file and all d migration file in d migration 📁,  then I run the python manage.py makemigrations,  migrate to create a new db file,  try that and it will definitely wrk 

On Aug 14, 2019 18:32, "Kean" <kea...@gmail.com> wrote:

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.

Kean

unread,
Aug 14, 2019, 2:54:03 PM8/14/19
to django...@googlegroups.com
Hi,

closed down instance django running
deleted db.sqlite3
run python3 manage.py makemigrations
run python3 manage.py migrate

all exceptions were handled and migrate file created.
 
checked in admin on ‘myowndbase'…error still appears.

Best,


On 14 Aug 2019, at 19:35, Tosin Ayoola <tosina...@gmail.com> wrote:

 delete my sqlite.db file

Kean

unread,
Aug 14, 2019, 3:13:11 PM8/14/19
to django...@googlegroups.com
Hi,

Thanks for the help, it is making progress I think.
Since deleting and recreating, I now have a different error.

Please see below:

OperationalError at /admin/accounts/businessownercreate/

no such table: accounts_businessownercreate
Request Method:GET
Request URL:http://127.0.0.1:8000/admin/accounts/businessownercreate/
Django Version:2.2.4
Exception Type:OperationalError
Exception Value:
no such table: accounts_businessownercreate
Exception Location:/Users/ProductionEnv/Desktop/prj1/project/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py in execute, line 383
Python Executable:/Users/ProductionEnv/Desktop/prj1/project/bin/python3
Python Version:3.7.4

So when trying to access the table, I get the above error messages.

Is there another step for me to undertake to resolve?

Best,

K

RONAK JAIN

unread,
Aug 14, 2019, 3:13:27 PM8/14/19
to django...@googlegroups.com
Okay,  so please conect with me on teamviewer...

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2F780E21-2B62-46DD-A518-976E7C138350%40gmail.com.

RONAK JAIN

unread,
Aug 14, 2019, 3:15:00 PM8/14/19
to django...@googlegroups.com
I think ,  getting same error..

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/04551BC1-7EE5-4504-9023-96DDC711432F%40gmail.com.

Kean

unread,
Aug 14, 2019, 3:15:17 PM8/14/19
to django...@googlegroups.com
HI Ronak, 

Ok, please can you guide me through how to do this, I have team viewer?

Thanks,

Kean

RONAK JAIN

unread,
Aug 14, 2019, 3:18:25 PM8/14/19
to django...@googlegroups.com
I need your id and password

RONAK JAIN

unread,
Aug 14, 2019, 3:18:50 PM8/14/19
to django...@googlegroups.com
So you can conect with me on hangout...

Kean

unread,
Aug 14, 2019, 3:26:22 PM8/14/19
to django...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages