Re: On django model.

2021-12-24 Thread Bernard Mallala
Inspectdb is generating an error because your table 's schema is causing a conflict. To solve this, you will need to post the exact error here and the schema of your table here for analysis. This is a longer process for analysis in case it is not immediately obvious. My recommendation is for yo

Re: On django model.

2021-12-24 Thread Amor Zamora
I have done this but inspectdb generates an error and not the model. When I do the migration it doesn't give me an error but it doesn't create the new log in the database. El vie, 24 dic 2021 a las 14:03, Sebastian Jung () escribió: > Hello, > > Insectdb is not to generate/update database. Pleas

Re: Why does sqlmigrate need a connection to an existing database?

2021-12-24 Thread Shmuel Treiger
To any future readers, the real answer is that connections are deeply baked into how Django migrations operate. Things as seemingly simple as `can_migrate_model` require a connection. The other problems pointed out by Jason are easily patched, but the schema_editor (and all of the migration ope

Re: On django model.

2021-12-24 Thread Bernard Mallala
You can achieve this in two ways: 1. python manage.py inspectdb --help Introspects the database tables in the given database and outputs a Django model module. Your id field should be a sequenced integer and primary key so must include these two lines if viewing the CREATE SQL sta

Re: On django model.

2021-12-24 Thread Rafael Matos Borges
Falar brasileiro? Em sex., 24 de dez. de 2021 10:03, Sebastian Jung escreveu: > Hello, > > Insectdb is not to generate/update database. Please make it with python > manage.py makemigrations and after that python manage.py migrate > > Please read a tutorial https://tutorial.djangogirls.org/de/ >

Re: On django model.

2021-12-24 Thread Muhammad Juwaini Abdul Rahman
Have you checked the content of that table using dbshell? I have suspicion that the ID in your table is not a mere bigint. According to your error message, it is 'slice' (I don't know what it is), so you need to investigate what kind of data stored before you can move forward from this issue. On

Re: On django model.

2021-12-24 Thread Sebastian Jung
Sorry i don't understand nothing what do you say... Please write us a example what yoz want to do. Normal case is that you define your model in model.py and after this you make makemigrations ans after that migrate... Amor Zamora schrieb am Fr., 24. Dez. 2021, 14:34: > I think he did not underst

Re: On django model.

2021-12-24 Thread Amor Zamora
I think he did not understand the situation, because with migrations I don't resolve to convert the database into the model. The process that I need is the other way around. I needs for a table created in the database to be included in the model. El vie, 24 dic 2021 a las 14:03, Sebastian Jung ()

Re: On django model.

2021-12-24 Thread Muhammad Juwaini Abdul Rahman
I think you're the one who don't fully understand Amor's email. On Fri, 24 Dec 2021 at 21:03, Sebastian Jung wrote: > Hello, > > Insectdb is not to generate/update database. Please make it with python > manage.py makemigrations and after that python manage.py migrate > > Please read a tutorial h

Re: On django model.

2021-12-24 Thread Sebastian Jung
Hello, Insectdb is not to generate/update database. Please make it with python manage.py makemigrations and after that python manage.py migrate Please read a tutorial https://tutorial.djangogirls.org/de/ Regards Amor Zamora schrieb am Fr., 24. Dez. 2021, 13:11: > Hi guys. > I have an applicat

On django model.

2021-12-24 Thread Amor Zamora
Hi guys. I have an application in Django that has a database in postgresql. But a new table was added to that database. I have tried using the inspectdb (python3 manage.py inspectdb tracking_visit) command, to add that table to the DJango model, but it gives me an exception, it tells me that the ID