Re: Writing migrations to wrong database entirely

2023-11-14 Thread Lutaaya Jamil
s even > though settings.py had its own definition under DATABASES. > > I temporarily changed the DATABASE_URL var to a different name to > eliminate it from the equation and then to be sure, I ran python manage.py > migrate zero on each app, then ran initial migrations for the > au

Re: Writing migrations to wrong database entirely

2023-11-14 Thread David Crandell
the equation and then to be sure, I ran python manage.py migrate zero on each app, then ran initial migrations for the auth and django tables and then makemigrations on my own models. It cleared everything up and migrated to the proper DB. Thank y'all for your help. T On Tuesday, Novemb

Re: Writing migrations to wrong database entirely

2023-11-14 Thread Ahmed Iftikhar
It's possible that there is a migration state issue. Try running the following commands: *python manage.py migrate zeropython manage.py migrate * This will revert all migrations for the specified app and then migrate all apps to the initial state. Be cautious, as this will reset

Re: Writing migrations to wrong database entirely

2023-11-14 Thread Lutaaya Jamil
ve > developed a couple business grade apps which are deployed and doing great. > > The other day, I created a new project with a new database, etc. > > I built out the initial models and migrated them to the proper database. > However, subsequent migrations are going to a da

Writing migrations to wrong database entirely

2023-11-14 Thread David Crandell
nitial models and migrated them to the proper database. However, subsequent migrations are going to a database I built for another app entirely. The two databases aren't on the same host, don't have similar names - they have nothing in common. How is this possible? Is there some connection

Re: Running migrations with multiple databases

2023-07-11 Thread shahee...@gmail.com
Thanks: just what I needed to know! On Tuesday, 11 July 2023 at 02:48:48 UTC+1 David Nugent wrote: Migrations are executed according to how your db routers is setup. See setting DATABASE_ROUTERS. Note that normally you would be replicating secondaries, so migrations are normally not applied

Re: Running migrations with multiple databases

2023-07-10 Thread David Nugent
Migrations are executed according to how your db routers is setup. See setting DATABASE_ROUTERS. Note that normally you would be replicating secondaries, so migrations are normally not applied on all bu the primary, so this is the default. Regards, David On Mon, Jul 10, 2023 at 10:26 PM

Running migrations with multiple databases

2023-07-10 Thread Shaheed Haque
n see, the Postgres database names are "foo" and "archive_restore" respectively. For all normal Django purposes, we want to use "default", aka "foo". The "archive_restore" connection/database is used in conjunction with a bunch of psql commands to create a

pub_date field is not visible in admin panel, even after configuring the app made migrations i tried every way possible from my side

2023-05-31 Thread Likhith K.P.
from django.db import models # Create your models here. class Question(models.Model): question_text = models.CharField(max_length = 500) pub_date = models.DateTimeField(auto_now_add = True) def __str__(self): return self.question_text class Choice(models.Model): question

Re: Data migrations ran multiple times during deploy

2023-01-10 Thread Harris Lapiroff
Thanks, all for the responses! They're helpful, particularly: - Using a separate single service to run migrations - django-syzygy looks interesting and might also solve another issue we've been having lately trying to achieve zero-downtime deploys Best, Harris On Sunday,

Re: Data migrations ran multiple times during deploy

2023-01-08 Thread Aviv Avitan
We experience the same problems and those races are probably inevitable 1. django-syzygy (quroum) may solves this issue as it will use a semaphore to prevent any migrations before seeing "X migrates". this will prevent any races. On the same note, it will introduce migrate --pre wh

Re: Data migrations ran multiple times during deploy

2023-01-07 Thread Madhava Raju Sripathi
thank you subscribe my channel @VictoriaPalanki9573974636 On Friday, January 6, 2023 at 6:12:32 PM UTC+5:30 harrisl...@gmail.com wrote: > Hi, all! Curious about how folks do data migrations as we ran into an > issue recently: > > Our production deployment consists of three contai

Re: Data migrations ran multiple times during deploy

2023-01-07 Thread quentinsf
te: >> >> Hi, all! Curious about how folks do data migrations as we ran into an >> issue recently: >> >> Our production deployment consists of three containers running the >> application. When each container comes up it runs a series of startup tasks

Data migrations ran multiple times during deploy

2023-01-06 Thread Harris Lapiroff
Hi, all! Curious about how folks do data migrations as we ran into an issue recently: Our production deployment consists of three containers running the application. When each container comes up it runs a series of startup tasks include `./manage.py migrate`. Usually it's fine to run

Squashing Data Migrations

2022-12-28 Thread Saksham Bajaj
ation. Following exactly the pattern in the given documentation on data migrations <https://docs.djangoproject.com/en/4.1/topics/migrations/#data-migrations> . In this case, this migration file was called 'add_areas.py' and exists in the `migrations/ ` folder as exp

Re: Added new column to model and run migrations but not applied to database table

2022-10-10 Thread Jhoan
Hello guys in my case I add a new table an the issue cames up, I try all the solutions here but none of there works for me, I have to do - Backup of the database, - Delete all tables in MySQL, - Delete migrations files, - Make migrations - Migrate - Upload the data - And off course worked Is

Re: migrations not created for foreign key when primary key type is changed

2022-09-03 Thread Devang
e target model. > > Cheers > Markus > > On Fri, Sep 2, 2022, at 10:39 AM, Manasvi Dobariya wrote: > > I have default primary key in the model which is being referenced as > foreign key in another model. Now, when I change this primary key type from > AutoField to BigAutoField, m

Re: migrations not created for foreign key when primary key type is changed

2022-09-03 Thread Markus Holtermann
default primary key in the model which is being referenced as foreign > key in another model. Now, when I change this primary key type from AutoField > to BigAutoField, migrations for only primary keys are being generated no > migration for foreign key is generated. However, when I ap

Re: migrations not created for foreign key when primary key type is changed

2022-09-02 Thread Devang
AutoField to BigAutoField, migrations for only primary keys are being > generated no migration for foreign key is generated. However, when I apply > the migration generated for primary key, foreign key type also gets changed > from int to bigint in postgres database. Is it expected t

migrations not created for foreign key when primary key type is changed

2022-09-02 Thread Manasvi Dobariya
I have default primary key in the model which is being referenced as foreign key in another model. Now, when I change this primary key type from AutoField to BigAutoField, migrations for only primary keys are being generated no migration for foreign key is generated. However, when I apply the

Re: Added new column to model and run migrations but not applied to database table

2022-07-03 Thread Thomas Lockhart
Sorry that you are having continued problems. Your first report was almost a year ago and did not end up getting resolved but all the history on your thread is missing here so we can’t help with this information. “Migrations were not added” might indicate that your development server is out of

Re: Added new column to model and run migrations but not applied to database table

2022-07-03 Thread Malik Rumi
time, I fixed the issue by doing like this >> >> "I have tried all the ways what you guys suggested me But here I don't >> want change database why because it is deployment server so, when I run >> manage.py makemigrations migrations are applied and changes are

Re: Added new column to model and run migrations but not applied to database table

2022-06-15 Thread Salima Begum
gested me But here I don't > want change database why because it is deployment server so, when I run > manage.py makemigrations migrations are applied and changes are reading but > when I run manage.py migrate changes are not taken to database so, Manually > I queried queries to a

Re: migrations problem in django

2022-06-02 Thread Steve Smith
Looks like a spelling error at first glancemax_length...not max_lenght That's my first guess... From: django-users@googlegroups.com on behalf of Paras Kashyap Sent: Wednesday, June 1, 2022 12:00 PM To: Django users Subject: migrations problem in d

Re: migrations problem in django

2022-06-02 Thread Ayser shuhaib
d keyword argument 'max_lenght' > > > You have probably seen this already ... should be 'max_length' > > Please someone tell me how to fix this error, this error occurs when i try > to make migrations > -- > You received this message because you are subscri

Re: migrations problem in django

2022-06-01 Thread Mike Dewhirst
On 2/06/2022 3:00 am, Paras Kashyap wrote: TypeError: Field.__init__() got an unexpected keyword argument 'max_lenght' You have probably seen this already ... should be 'max_length' Please someone tell me how to fix this error, this error occurs when i try to make migrati

migrations problem in django

2022-06-01 Thread Paras Kashyap
TypeError: Field.__init__() got an unexpected keyword argument 'max_lenght' Please someone tell me how to fix this error, this error occurs when i try to make migrations -- You received this message because you are subscribed to the Google Groups "Django users" group. To u

how to use migrations in runtime for models creation?

2022-02-23 Thread Prashanth Patelc
hey , im working on dynamic models , im receiving model name and fields in front-end eg: class Users(models.Model): name=models.Charfield(max_length=30) last_name=models.Charfield(max_length=30) ,,, after this i dont need to save into the models.py i need to store the data(c

Re: migrations: "no changes detected"

2022-02-16 Thread Dev femibadmus
I have and solve this allot, after adding to ur model myapp run the following: >> python manage.py makemigrations myapp >> python manage.py migrate myapp num where num is the new migrations made u can see this when u open myapp/migrations the new file 000(n) is the num If this does

Re: migrations: "no changes detected"

2022-02-09 Thread frank maduka
ou > must either define the environment variable DJANGO_SETTINGS_MODULE or call > settings.configure() before accessing settings. > On Tue, Feb 8, 2022 at 7:32 PM ramadhan ngallen <https://mailto:ngall...@gmail.com>> wrote: > > On your app(blog) on the module(folder) migrations,

Re: migrations: "no changes detected"

2022-02-08 Thread ramadhan ngallen
rote: > > On your app(blog) on the module(folder) migrations,   make sure there is a > > file named   __init__.py > > > > > > You can share app structure too > > On 9 Feb 2022, 06:26 +0300, 'Delvin Alexander' via Django users > > , wrote: &

Re: migrations: "no changes detected"

2022-02-08 Thread ramadhan ngallen
variable DJANGO_SETTINGS_MODULE or call > settings.configure() before accessing settings. > On Tue, Feb 8, 2022 at 7:32 PM ramadhan ngallen wrote: > > On your app(blog) on the module(folder) migrations,   make sure there is a > > file named   __init__.py > > > > &

Re: migrations: "no changes detected"

2022-02-08 Thread 'Delvin Alexander' via Django users
LE or call settings.configure() before accessing settings. On Tue, Feb 8, 2022 at 7:32 PM ramadhan ngallen wrote: > On your app(blog) on the module(folder) migrations, make sure there is a > file named __init__.py > > > You can share app structure too > On 9 Feb 2022, 06:26 +0300, &

Re: migrations: "no changes detected"

2022-02-08 Thread ramadhan ngallen
On your app(blog) on the module(folder) migrations,   make sure there is a file named   __init__.py You can share app structure too On 9 Feb 2022, 06:26 +0300, 'Delvin Alexander' via Django users , wrote: > here is a list of my installed apps: > > i added the blog.app

Re: migrations: "no changes detected"

2022-02-08 Thread 'Delvin Alexander' via Django users
models. > > All the best > > > On Tue, 8 Feb 2022, 10:14 am 'Delvin Alexander' via Django users, < > django-users@googlegroups.com> wrote: > >> I am trying to run migrations so that i can create a table, but when I >> type out, "python manage

Re: migrations: "no changes detected"

2022-02-08 Thread Yeboah Dominic
I think this has to be like you are trying to add some model whose field is not recognizable I have the same issue when using geodjango. If you delete the DB.sqlite3 sometimes it won't work or even deleting the migrations won't also work. If that happens just run, 1. python manage.py mak

RE: migrations: "no changes detected"

2022-02-08 Thread Feroz Ahmed
8 February 2022 10:12 To: Django users Subject: migrations: "no changes detected" I am trying to run migrations so that i can create a table, but when I type out, "python manage.py makemigrations" it returns this: "no changes detected" would anyone know the

Re: migrations: "no changes detected"

2022-02-08 Thread Fajri Fath
You must delete your folder migrations in your app. Example: rm -rf myapplication/migrations And rm db.sqlite3 and run python manage.py makemigrations Pada tanggal Sel, 8 Feb 2022 11.43 AM, 'Delvin Alexander' via Django users < django-users@googlegroups.com> menulis: >

Re: migrations: "no changes detected"

2022-02-07 Thread Armaan Alam
> All the best > > > On Tue, 8 Feb 2022, 10:14 am 'Delvin Alexander' via Django users, < > django-users@googlegroups.com> wrote: > >> I am trying to run migrations so that i can create a table, but when I >> type out, "python manage.py makemigrations&

Re: migrations: "no changes detected"

2022-02-07 Thread RANGA BHARATH JINKA
Hi, I think you forgot to add the app name in settings file. Please add the app names in installed apps. Then it will find out the models. All the best On Tue, 8 Feb 2022, 10:14 am 'Delvin Alexander' via Django users, < django-users@googlegroups.com> wrote: > I am trying t

migrations: "no changes detected"

2022-02-07 Thread 'Delvin Alexander' via Django users
I am trying to run migrations so that i can create a table, but when I type out, "python manage.py makemigrations" it returns this: "no changes detected" would anyone know the reason for this? -- You received this message because you are subscribed to the Google Groups

Re: are migrations the same regardless of database type?

2021-12-29 Thread Anil Felipe Duggirala
Thanks to all for your replies. Using the "sqlmigrate" command, as far as I can see, there are no differences between database types. I asked this question initially because I was unable to set up postgresql locally. I have solved those issues now and will follow your advice on using the same d

Re: are migrations the same regardless of database type?

2021-12-28 Thread Bernard Mallala
Migrations are different depending on your DBMS. Why? Briefly, here are a few reasons : 1. RDBMS or DBMS (Database management system) is a software that organizes the data in a database thus allowing for easy management, administration, retrieval and manipulation of data by users or

Re: are migrations the same regardless of database type?

2021-12-28 Thread Jason
Not exactly. Migrations try to be generalized across db types, but that doesn't mean that you can be using db-specific features in your models and ORM usage. Thats one reason its highly, highly recommended to use the same database and version at all layers of your stack. In other word

Re: are migrations the same regardless of database type?

2021-12-28 Thread Lars Liedtke
As far as I know, the migrations are "Python-Code" in themselves, only defining which tables change in what way. Only when they are being applied, this is turned into actual database code. But you can test this easily by creating migrations and look at them. Or use e.g. a postg

are migrations the same regardless of database type?

2021-12-28 Thread Anil Felipe Duggirala
hello, I running an app locally using an SQlite database (I have not been able to set up postgresql locally). I am running the same app in Heroku, using Postgresql. If I run "makemigrations" locally, then push those migrations to Heroku (which is using postgresql), will those mig

Re: __init__() got an unexpected keyword argument 'on delete' when make migrations

2021-12-06 Thread Khánh Hoàng
motions, >> on_delete=models.CASCADE) >> >> >> On Sun, Dec 5, 2021, 21:09 Samuel Nogueira wrote: >> >>> Please, can you take some prints of your models? >>> >>> Em dom., 5 de dez. de 2021 12:34, Khánh Hoàng >>> escreveu: >

Re: __init__() got an unexpected keyword argument 'on delete' when make migrations

2021-12-05 Thread Aashish Kumar
. de 2021 12:34, Khánh Hoàng < >> hoangduckhanh432...@gmail.com> escreveu: >> >>> Hi everyone, I am new to programming, more than 4 months, I had an issue >>> when making migrations for my apps. >>> >>> I run :" python manage.py makemigrations &

Re: __init__() got an unexpected keyword argument 'on delete' when make migrations

2021-12-05 Thread Thomas Lockhart
amming, more than 4 months, I had an issue when > making migrations for my apps. > > I run :" python manage.py makemigrations " and I got a error. > It said: TypeError: __init__() got an unexpected keyword argument 'on > delete' > I'm Using Djan

Re: __init__() got an unexpected keyword argument 'on delete' when make migrations

2021-12-05 Thread Khánh Hoàng
dels.CASCADE) > > > On Sun, Dec 5, 2021, 21:09 Samuel Nogueira wrote: > >> Please, can you take some prints of your models? >> >> Em dom., 5 de dez. de 2021 12:34, Khánh Hoàng >> escreveu: >> >>> Hi everyone, I am new to programming, more than 4

Re: __init__() got an unexpected keyword argument 'on delete' when make migrations

2021-12-05 Thread Anurag Agarwal
34, Khánh Hoàng < > hoangduckhanh432...@gmail.com> escreveu: > >> Hi everyone, I am new to programming, more than 4 months, I had an issue >> when making migrations for my apps. >> >> I run :" python manage.py makemigrations " and I got a error. >&g

Re: __init__() got an unexpected keyword argument 'on delete' when make migrations

2021-12-05 Thread Khánh Hoàng
, 5 tháng 12, 2021, hu3mu...@gmail.com đã viết: > Please, can you take some prints of your models? > > Em dom., 5 de dez. de 2021 12:34, Khánh Hoàng > escreveu: > >> Hi everyone, I am new to programming, more than 4 months, I had an issue >> when making migrations for m

Re: __init__() got an unexpected keyword argument 'on delete' when make migrations

2021-12-05 Thread Samuel Nogueira
Please, can you take some prints of your models? Em dom., 5 de dez. de 2021 12:34, Khánh Hoàng escreveu: > Hi everyone, I am new to programming, more than 4 months, I had an issue > when making migrations for my apps. > > I run :" python manage.py makemigrations " and

Re: __init__() got an unexpected keyword argument 'on delete' when make migrations

2021-12-05 Thread Uzzal Hossain
Change on delete to on_delete in your model On Sun, Dec 5, 2021, 9:34 PM Khánh Hoàng wrote: > Hi everyone, I am new to programming, more than 4 months, I had an issue > when making migrations for my apps. > > I run :" python manage.py makemigrations " and I got a error.

__init__() got an unexpected keyword argument 'on delete' when make migrations

2021-12-05 Thread Khánh Hoàng
Hi everyone, I am new to programming, more than 4 months, I had an issue when making migrations for my apps. I run :" python manage.py makemigrations " and I got a error. It said: TypeError: __init__() got an unexpected keyword argument 'on delete' I'm Using

Re: Added new column to model and run migrations but not applied to database table

2021-08-15 Thread Salima Begum
manage.py makemigrations migrations are applied and changes are reading but when I run manage.py migrate changes are not taken to database so, Manually I queried queries to add columns into respected tables into database." I really think this might not be a sustainable solution. So, I would really l

Renaming Django model without breaking existing migrations

2021-08-12 Thread Alan Evangelista
I want to rename a model in Django 3.2, keep my existing migrations and be able to both migrate a db with the old table name and create a db from scratch. I've started by renaming the model class and all references to it in the code. As "./manage.py makemigrations" did not automat

Re: Added new column to model and run migrations but not applied to database table

2021-07-26 Thread guna visva
having had the unfortunate phase of dealing with it , sorting it requires some patience the issue is the tables in django_migrations is not in sync with rest the rest of your database or migrations files. You have to first remove the addition in field etc and make sure the database tables

Re: Added new column to model and run migrations but not applied to database table

2021-07-20 Thread Sebastian Jung
Is in settings.py also in installed app? Without that migrations don't work Salima Begum schrieb am Di., 20. Juli 2021, 19:00: > Hi , > Thank you for your responses. > I have tried all the ways Which you people suggested I am not getting any > error while running makemigratio

Re: Added new column to model and run migrations but not applied to database table

2021-07-20 Thread Salima Begum
Hi , Thank you for your responses. I have tried all the ways Which you people suggested I am not getting any error while running makemigrations or migrate and python manage.py migrate --fake-initial. But those migrations are not applying to the database. How can I fix this issue without deleting

Re: Added new column to model and run migrations but not applied to database table

2021-07-19 Thread Aman Vyas
if it is saying no changes detected while running makemigrations and you are sure that you changed models.py then these things you can try: 1: python manage.py makemigrations appname if this will not work then do that 2: delete migrations folder from your app and delete database then run again

Re: Added new column to model and run migrations but not applied to database table

2021-07-19 Thread Boris Pérez
python manage.py migrate --fake-initial 2021-07-19 3:32 GMT-04:00, Ayser shuhaib : > What you can do is just change the name of the model then run the migration > after that change it back to the original name and run the migration again. > This what I do when facing such problem > > On Mon, 19 Ju

Re: Added new column to model and run migrations but not applied to database table

2021-07-19 Thread Ayser shuhaib
What you can do is just change the name of the model then run the migration after that change it back to the original name and run the migration again. This what I do when facing such problem On Mon, 19 Jul 2021 at 07:07, Salima Begum wrote: > Hi all, > > I have added a new column to the existin

Re: Added new column to model and run migrations but not applied to database table

2021-07-19 Thread Ayser shuhaib
What you can do is just change the name of the model then run the migration after that change it back to the original name and run the migration again. This what I do when facing such problem On Mon, 19 Jul 2021 at 08:41, Salima Begum wrote: > Hi Abhishek, What you suggested will work but I don'

Re: Added new column to model and run migrations but not applied to database table

2021-07-18 Thread Salima Begum
Hi Abhishek, What you suggested will work but I don't want to change my database without changing databases. I want to fix this issue. How can I achieve this? Please help me out. Thank you very much for your quick response. Thank you ~Salima On Mon, Jul 19, 2021 at 11:45 AM Abhishek Choudhury <

Re: Added new column to model and run migrations but not applied to database table

2021-07-18 Thread Abhishek Choudhury
Hi Salima, If you're in a hurry and trying it on development, I think you can create a new database and run the migrate command. This will recreate the schema and your issue will be resolved in no time. Thanks and regards, Abhishek Choudhury On Mon, 19 Jul 2021 at 10:37 AM, Salima Begum wrote:

Added new column to model and run migrations but not applied to database table

2021-07-18 Thread Salima Begum
Hi all, I have added a new column to the existing model while developing. Then I run makemigrations and migrate. It is not applied to the database table which is created based on that model. How can I fix this issue? Please help me to complete this issue. The below issue I am facing in deployment

[Solved]: Unit testing migrations [Was: Related model 'company.user' cannot be resolved]

2021-07-07 Thread Mike Dewhirst
. The mission here is to tweak the migrations so the test harness can create a test database without error. 6. Delete the migration which deletes User and UserProfile tables from common 7. Edit company/migrations/0001_initial.py to include the contents of the latest migration which created Use

Unit testing migrations [Was: Related model 'company.user' cannot be resolved]

2021-07-06 Thread Mike Dewhirst
itial wouldn't work due to lots of other models looking for settings.AUTH_USER_MODEL which Django couldn't find in the company app so I finessed my own fake migrations. That also seemed to work and the job seemed done. BUT manage.py test now fails with "Related model 'company.

migrations creating tables, but not creating columns

2021-06-11 Thread David Crandell
ister([CLASS]) and sure enough, none of those fields exist there either. I have deleted the migrations and even the sqliteDb and re-ran the migrations, all successful, same result. I saw some previous posts about using pyCharm and I have been using that. But I have run all of my migrations in

Re: Customizable model field (such as SRID for geometries) and migrations

2021-06-05 Thread Chetan Ganji
m (WGS84) and reprojecting on > the fly will not work due to performance and accuracy implications for > geometric queries. Thus I'd like to make the SRID customizable. > > The issue comes with migrations which hard-code the SRID in the > CreateModel statements. I could import an

Customizable model field (such as SRID for geometries) and migrations

2021-06-01 Thread Olivier Dalang
eries. Thus I'd like to make the SRID customizable. The issue comes with migrations which hard-code the SRID in the CreateModel statements. I could import an SRID from a variable in settings.py, but don't like that idea, as changing it after creating would mess things up (srid mismatc

save() in a loop. (Data Migrations example).

2021-03-01 Thread konstanti...@gmail.com
I'm wondering about this code snippet from the documentation <https://docs.djangoproject.com/en/3.1/topics/migrations/#data-migrations> for person in Person.objects.all(): person.name = '%s %s' % (person.first_name, person.last_name) person.save() This looks like

Deleting models from django without affecting migrations

2021-02-14 Thread shreeh...@gmail.com
Hi, i want to delete few models which are redundant from few django apps. The main issue is that the codebase is quite big and in the future if we have to migrate again from the beginning, it might throw errors for sure. Any efficient/best way to handle this? Any kind of help will be appreciated

Django Migrations: Converting a PK field to ID + PK for Multi-table Inheritance

2020-09-22 Thread Julian Klotz
Dear Django community, in a project, I’m struggling to fix a problem with my database schema and data migrations. Here’s what I want to do: My application used to have a “Person” model. As time went by, it turned out that we would also need an model for “Organization”. Both should inherit

Re: Question on migrations vs postgres database

2020-06-21 Thread Mike Dewhirst
On 22/06/2020 8:04 am, Ram wrote:   self.cursor.execute("DELETE from django_migrations WHERE app = %s", % app) There should not be a comma in that line -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop r

Re: Question on migrations vs postgres database

2020-06-21 Thread Ram
velopment server in the past. The application was >>> working fine in the past. Now we merged our new features into the same >>> repository which has new models in our models.py. When we merged the >>> changes into the development server, we tried running these commands >>&

Re: Question on migrations vs postgres database

2020-06-14 Thread Ram
w features into the same >> repository which has new models in our models.py. When we merged the >> changes into the development server, we tried running these commands >> >> 1. python3 manage.py makemigrations >>> < no changes detected > >>> 2. python3

Re: Question on migrations vs postgres database

2020-06-12 Thread Integr@te System
mmands > > 1. python3 manage.py makemigrations >> < no changes detected > >> 2. python3 manage.py migrate >> < no migrations to apply > >> 3. python3 manage.py reset_migrations >> < all the migrations are created fine including new tables > >

Question on migrations vs postgres database

2020-06-12 Thread Ram
development server, we tried running these commands 1. python3 manage.py makemigrations > < no changes detected > > 2. python3 manage.py migrate > < no migrations to apply > > 3. python3 manage.py reset_migrations > < all the migrations are created fine including new

Watch "Django : Table doesn't exist | Fake migrations | no such table" on YouTube

2020-04-29 Thread Anonymous Patel
https://youtu.be/dXlYIkXmbbw If you are facing such error here is video to solve this error. Errormania they are developing a open community, anyone can join their telegram group and ask for solutions and even can provide solutions to others programming errors Raj Patel -- You received this me

Re: Watch "Django : Table doesn't exist | Fake migrations | no such table" on YouTube

2020-04-28 Thread Alay Patel
So jaao raj bhaiya On Wed, 29 Apr, 2020, 1:42 AM Dylan Reinhold, wrote: > It might just be me but this feels like spam... > > On Tue, Apr 28, 2020 at 1:06 PM Anonymous Patel > wrote: > >> https://youtu.be/dXlYIkXmbbw >> >> >> Errormania upcoming with as many solutions as possible in short time

Re: Watch "Django : Table doesn't exist | Fake migrations | no such table" on YouTube

2020-04-28 Thread Dylan Reinhold
It might just be me but this feels like spam... On Tue, Apr 28, 2020 at 1:06 PM Anonymous Patel wrote: > https://youtu.be/dXlYIkXmbbw > > > Errormania upcoming with as many solutions as possible in short time so > that no Developers can stuck. > > Share like and subscribe , i liked this channel

Watch "Django : Table doesn't exist | Fake migrations | no such table" on YouTube

2020-04-28 Thread Anonymous Patel
https://youtu.be/dXlYIkXmbbw Errormania upcoming with as many solutions as possible in short time so that no Developers can stuck. Share like and subscribe , i liked this channel personally. Even my friends in this channel will also like it Raj Patel -- You received this message because you a

Re: Problem with migrations order

2020-03-24 Thread Yves de Champlain
Hi Thanks for your answer. Actually, I'm working on a clean migrate : find . -path "*/migrations/*.py" -not -name "__init__.py" -not -path "./data/*" -delete find . -path "*/migrations/*.pyc" -delete psql -U postgres $DB_NAME < > make sur

Re: Problem with migrations order

2020-03-24 Thread Akinfolarin Stephen
ed a new app 'portfolio' in my project, but since then migrations > won't work anymore because Django seems to be trying to do them in the > wrong order. > > *Running migrations:* > > Applying core.0001_initial...* OK* > > Applying contentt

Problem with migrations order

2020-03-23 Thread Yves de Champlain
Hi I added a new app 'portfolio' in my project, but since then migrations won't work anymore because Django seems to be trying to do them in the wrong order. *Running migrations:* Applying core.0001_initial...* OK* Applying contenttypes.0001_initial...* OK* Applyi

Django migrations

2020-02-15 Thread maninder singh Kumar
I have 4 MySQL databases and use routers to manage them.The tables are created and the migration is successful however django server shows one migration to be applied. If the command is to ". python3 manage.py migrate" it does apply the migration but to the auth table which is the default table

new migrations coming up when blank=True in booleanfield in django 2.1+

2019-12-05 Thread anvesh Agarwal
As document says, https://docs.djangoproject.com/en/2.2/ref/models/fields/#booleanfield previously blank=True was implicit but in django 2.1+ , we have to add it externally. So i dont understand why new migrations are coming up for this? Does this mean that previously blank=True wasnt

Migrations appear to run twice when running tests

2019-11-19 Thread Rich Rauenzahn
I'm trying to figure out why my migrations appear to run twice when unit testing.I do have multiple dbs with custom routers to route to different databases. I've tried debugging and tracing the routers to see if that's where the issue lies, but I don't know enough

Re: Getting ```AttributeError: 'str' object has no attribute 'state_forwards'``` when running a migrations, Down there is the migrations file. please help

2019-10-22 Thread Jorge Gimeno
;> >> >> >> from django.db import migrations, models >> >> import django.db.models.deletion >> >> import django_extensions.db.fields >> >> >> >> >> >> class Migration(migrations.Migration): >> >>

Re: Getting ```AttributeError: 'str' object has no attribute 'state_forwards'``` when running a migrations, Down there is the migrations file. please help

2019-10-22 Thread fils-aime walnes andre
Merci freo Le lundi 21 octobre 2019, adonis simo a écrit : > > # Generated by Django 2.2.3 on 2019-10-21 22:00 > > > > from django.db import migrations, models > > import django.db.models.deletion > > import django_extensions.db.fields > > > >

Re: Getting ```AttributeError: 'str' object has no attribute 'state_forwards'``` when running a migrations, Down there is the migrations file. please help

2019-10-22 Thread fils-aime walnes andre
Merci freo Le lundi 21 octobre 2019, adonis simo a écrit : > > # Generated by Django 2.2.3 on 2019-10-21 22:00 > > > > from django.db import migrations, models > > import django.db.models.deletion > > import django_extensions.db.fields > > > >

Re: Problem with SQLite and migrations

2019-08-21 Thread 'Amitesh Sahay' via Django users
Generally SqlLite is enough for any testing. However, if you are planning to test it with par the other regular DBs, then do not do it. I have seen your GIT-HUB code. Use postgres, you will be happy . On Wednesday, 21 August, 2019, 10:12:38 pm IST, Jonathan Mrutu wrote: Hi Jaemin, Yo

Re: Problem with SQLite and migrations

2019-08-21 Thread Jonathan Mrutu
Hi Jaemin, You can try to post this question on stack overflow, but why don't you use PostgreSQL this is recommended. SQLite as the name implies it's more for testing purpose in a small project environment. //Jona

Problem with SQLite and migrations

2019-08-21 Thread Jaemin Noh
Hello. My application is currently in a development state, so it's using SQLite as a database backend at the moment. Due to the bad design decisions, my application has a migration with raw CREATE VIEW statements and unmanaged models. These VIEWs refer other tables with JOIN clauses. The probl

Re: database migrations

2019-08-04 Thread Mike Dewhirst
created earlier. Have a look at PostgreSQL documentation online for those commands or similar docs for similar commands if you use a different RDBMS Cheers On 4/08/2019 10:34 pm, Jani Tiainen wrote: Hi. To me this sounds more debugging issue than migrations or database problem. Since it

Re: database migrations

2019-08-04 Thread Jani Tiainen
Hi. To me this sounds more debugging issue than migrations or database problem. Since it is most definitely your code that doesn't work right. Of course if youre building and testing features that fill thousands of entries or relatively complex data there are options. Personally

Re: database migrations

2019-08-03 Thread Perceval Maturure
Thanks Roger. On Sun, 04 Aug 2019 at 01:19, RLM wrote: > Why try to avoid re populating the database? That's the easy part, > figuring what went wrong is more difficult.You don't need a lot of data to > get an app working, you just need to understand what you want and how to > achieve it. > > W

Re: database migrations

2019-08-03 Thread RLM
Why try to avoid re populating the database? That's the easy part, figuring what went wrong is more difficult.You don't need a lot of data to get an app working, you just need to understand what you want and how to achieve it. When I was learning django I rebuilt my events database 20 times s

  1   2   3   4   5   6   >