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 so frustating this issue

El domingo, 3 de julio de 2022 a las 11:22:45 UTC-5, Thomas escribió:

> 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 sync with your production server and is somehow *behind*. I’m not 
> sure how big your development team is or how many development servers you 
> are running, but your “deployment czar” needs to make sure that these stay 
> sync’d.
>
> Perhaps a solution is to take the schema from your production server and 
> back port it to your development machines, then move forward to get 
> everything back in sync.
>
> Every other solution is a bit fiddly and likely requires some 
> understanding of how migrations are tracked and applied. And probably does 
> not solve your problem into the future since whatever you did a year ago to 
> get back running did not solve it for now.
>
> Hth
>
> - Tom
>
> On Jun 15, 2022, at 6:45 AM, Salima Begum  
> wrote:
>
> Hello Django experts,
>
> We are seeing this problem again and think that this should be a serious 
> bug in Django. We are wondering whether any one in this community is having 
> the same issue. I would appreciate it if you could share your thoughts on 
> this because we are really unhappy to see this problem again and again. 
>
> Thanks 
> ~Salima
>
> On Mon, Aug 16, 2021 at 9:47 AM Salima Begum  
> wrote:
>
>> Hi,
>> I am hitting this problem again with new code merges into the 
>> deployment server. Last 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 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 like to fix this permanently. I would appreciate it if someone could 
>> suggest a remedy for this issue.
>>
>> Thank you in advance
>> ~Salima
>>
>> On Tue, Jul 27, 2021 at 5:18 AM guna visva  wrote:
>>
>>> 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 are first in sync with your models, then 1. delete 
>>> migrations files and 2. delete django_migrations. Then 3.makemigrations and 
>>> 4. migrate fake.  All risks are yours to take
>>>
>>> Then finally just add your fields and makemigrations and migrate
>>>
>>> The above might/or not work as it might give some content type errors 
>>>
>>>
>>>
>>>
>>> On Wednesday, July 21, 2021 at 2:39:56 AM UTC+8 sebasti...@gmail.com 
>>> wrote:
>>>
 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 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 the 
> database? 
>
> Thank you
> ~Salima
>  
>
> On Mon, Jul 19, 2021 at 7:02 PM Aman Vyas  wrote:
>
>> 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 python manage.py makemigrations
>>
>>
>>
>>
>> On Mon, Jul 19, 2021 at 6:07 AM Salima Begum <
>> sali...@rohteksolutions.com> wrote:
>>
>>> 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 

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 sync with your production server and is somehow *behind*. I’m not sure how 
big your development team is or how many development servers you are running, 
but your “deployment czar” needs to make sure that these stay sync’d.

Perhaps a solution is to take the schema from your production server and back 
port it to your development machines, then move forward to get everything back 
in sync.

Every other solution is a bit fiddly and likely requires some understanding of 
how migrations are tracked and applied. And probably does not solve your 
problem into the future since whatever you did a year ago to get back running 
did not solve it for now.

Hth

- Tom

> On Jun 15, 2022, at 6:45 AM, Salima Begum  
> wrote:
> 
> Hello Django experts,
> 
> We are seeing this problem again and think that this should be a serious bug 
> in Django. We are wondering whether any one in this community is having the 
> same issue. I would appreciate it if you could share your thoughts on this 
> because we are really unhappy to see this problem again and again. 
> 
> Thanks 
> ~Salima
> 
> On Mon, Aug 16, 2021 at 9:47 AM Salima Begum  > wrote:
> Hi,
> I am hitting this problem again with new code merges into the deployment 
> server. Last 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 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 
> like to fix this permanently. I would appreciate it if someone could suggest 
> a remedy for this issue.
> 
> Thank you in advance
> ~Salima
> 
> On Tue, Jul 27, 2021 at 5:18 AM guna visva  > wrote:
> 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 are first in sync with your models, then 1. delete migrations files 
> and 2. delete django_migrations. Then 3.makemigrations and 4. migrate fake.  
> All risks are yours to take
> 
> Then finally just add your fields and makemigrations and migrate
> 
> The above might/or not work as it might give some content type errors 
> 
> 
> 
> 
> On Wednesday, July 21, 2021 at 2:39:56 AM UTC+8 sebasti...@gmail.com 
>  wrote:
> 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 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 the 
> database? 
> 
> Thank you
> ~Salima
>  
> 
> On Mon, Jul 19, 2021 at 7:02 PM Aman Vyas > wrote:
> 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 
> python manage.py makemigrations
> 
> 
> 
> 
> On Mon, Jul 19, 2021 at 6:07 AM Salima Begum > 
> wrote:
> 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 server after adding new field and 
> deployed into server.
> 
> ```
> psycopg2.errors.UndefinedColumn: column 
> shopping_ls_product_search.quality_prdct does not exist
> LINE 1: ... Col1 FROM "shopping_ls_product_search" WHERE ("shopping_...
> ```
> Thank you
> ~Salima
> 
> -- 
> 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 
> 

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

2022-07-03 Thread Malik Rumi
Hi Salima. I am having a similar issue. I see it has been two weeks without 
a response. Have you found a similar bur report on the Django bug tracker? 
Have you filed a bug report yourself? Have you found a sustainable 
solution? Thanks.

On Wednesday, June 15, 2022 at 8:46:59 AM UTC-5 sali...@rohteksolutions.com 
wrote:

> Hello Django experts,
>
> We are seeing this problem again and think that this should be a serious 
> bug in Django. We are wondering whether any one in this community is having 
> the same issue. I would appreciate it if you could share your thoughts on 
> this because we are really unhappy to see this problem again and again. 
>
> Thanks 
> ~Salima
>
> On Mon, Aug 16, 2021 at 9:47 AM Salima Begum  
> wrote:
>
>> Hi,
>> I am hitting this problem again with new code merges into the 
>> deployment server. Last 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 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 like to fix this permanently. I would appreciate it if someone could 
>> suggest a remedy for this issue.
>>
>> Thank you in advance
>> ~Salima
>>
>> On Tue, Jul 27, 2021 at 5:18 AM guna visva  wrote:
>>
>>> 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 are first in sync with your models, then 1. delete 
>>> migrations files and 2. delete django_migrations. Then 3.makemigrations and 
>>> 4. migrate fake.  All risks are yours to take
>>>
>>> Then finally just add your fields and makemigrations and migrate
>>>
>>> The above might/or not work as it might give some content type errors 
>>>
>>>
>>>
>>>
>>> On Wednesday, July 21, 2021 at 2:39:56 AM UTC+8 sebasti...@gmail.com 
>>> wrote:
>>>
 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 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 the 
> database? 
>
> Thank you
> ~Salima
>  
>
> On Mon, Jul 19, 2021 at 7:02 PM Aman Vyas  wrote:
>
>> 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 python manage.py makemigrations
>>
>>
>>
>>
>> On Mon, Jul 19, 2021 at 6:07 AM Salima Begum <
>> sali...@rohteksolutions.com> wrote:
>>
>>> 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 server after adding new 
>>> field and deployed into server.
>>>
>>> ```
>>> psycopg2.errors.UndefinedColumn: column 
>>> shopping_ls_product_search.quality_prdct does not exist
>>> LINE 1: ... Col1 FROM "shopping_ls_product_search" WHERE 
>>> ("shopping_...
>>> ```
>>> Thank you
>>> ~Salima
>>>
>>> -- 
>>> 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/CAMSz6bnLkeN001UnxO3PdCg06Jc%3Dcr22kZXc71KL4w5CbYq_Cw%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 

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

2022-06-15 Thread Salima Begum
Hello Django experts,

We are seeing this problem again and think that this should be a serious
bug in Django. We are wondering whether any one in this community is having
the same issue. I would appreciate it if you could share your thoughts on
this because we are really unhappy to see this problem again and again.

Thanks
~Salima

On Mon, Aug 16, 2021 at 9:47 AM Salima Begum 
wrote:

> Hi,
> I am hitting this problem again with new code merges into the
> deployment server. Last 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 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 like to fix this permanently. I would appreciate it if someone could
> suggest a remedy for this issue.
>
> Thank you in advance
> ~Salima
>
> On Tue, Jul 27, 2021 at 5:18 AM guna visva  wrote:
>
>> 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 are first in sync with your models, then 1. delete
>> migrations files and 2. delete django_migrations. Then 3.makemigrations and
>> 4. migrate fake.  All risks are yours to take
>>
>> Then finally just add your fields and makemigrations and migrate
>>
>> The above might/or not work as it might give some content type errors
>>
>>
>>
>>
>> On Wednesday, July 21, 2021 at 2:39:56 AM UTC+8 sebasti...@gmail.com
>> wrote:
>>
>>> 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 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 the
 database?

 Thank you
 ~Salima


 On Mon, Jul 19, 2021 at 7:02 PM Aman Vyas  wrote:

> 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 python manage.py makemigrations
>
>
>
>
> On Mon, Jul 19, 2021 at 6:07 AM Salima Begum <
> sali...@rohteksolutions.com> wrote:
>
>> 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 server after adding new
>> field and deployed into server.
>>
>> ```
>> psycopg2.errors.UndefinedColumn: column
>> shopping_ls_product_search.quality_prdct does not exist
>> LINE 1: ... Col1 FROM "shopping_ls_product_search" WHERE
>> ("shopping_...
>> ```
>> Thank you
>> ~Salima
>>
>> --
>> 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/CAMSz6bnLkeN001UnxO3PdCg06Jc%3Dcr22kZXc71KL4w5CbYq_Cw%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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAKZY6%3DAgrWzCmrBHpouSJG_Vfy7i6LQu81Q7EWBRq44Yf3053A%40mail.gmail.com
> 
> .
>
 --
 You received this message because you are subscribed to the Google
 Groups "Django 

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

2021-08-15 Thread Salima Begum
Hi,
I am hitting this problem again with new code merges into the
deployment server. Last 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 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
like to fix this permanently. I would appreciate it if someone could
suggest a remedy for this issue.

Thank you in advance
~Salima

On Tue, Jul 27, 2021 at 5:18 AM guna visva  wrote:

> 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 are first in sync with your models, then 1. delete
> migrations files and 2. delete django_migrations. Then 3.makemigrations and
> 4. migrate fake.  All risks are yours to take
>
> Then finally just add your fields and makemigrations and migrate
>
> The above might/or not work as it might give some content type errors
>
>
>
>
> On Wednesday, July 21, 2021 at 2:39:56 AM UTC+8 sebasti...@gmail.com
> wrote:
>
>> 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 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 the
>>> database?
>>>
>>> Thank you
>>> ~Salima
>>>
>>>
>>> On Mon, Jul 19, 2021 at 7:02 PM Aman Vyas  wrote:
>>>
 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 python manage.py makemigrations




 On Mon, Jul 19, 2021 at 6:07 AM Salima Begum <
 sali...@rohteksolutions.com> wrote:

> 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 server after adding new
> field and deployed into server.
>
> ```
> psycopg2.errors.UndefinedColumn: column
> shopping_ls_product_search.quality_prdct does not exist
> LINE 1: ... Col1 FROM "shopping_ls_product_search" WHERE ("shopping_...
> ```
> Thank you
> ~Salima
>
> --
> 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/CAMSz6bnLkeN001UnxO3PdCg06Jc%3Dcr22kZXc71KL4w5CbYq_Cw%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.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAKZY6%3DAgrWzCmrBHpouSJG_Vfy7i6LQu81Q7EWBRq44Yf3053A%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.
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAMSz6bmQ5KAQ2SFHCMbf8UHkg34itZPFZ1OksP-2C3t5wAwTJQ%40mail.gmail.com
>>> 
>>> .
>>>
>> --
> You received this message because you are 

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 are first in sync with your models, then 1. delete 
migrations files and 2. delete django_migrations. Then 3.makemigrations and 
4. migrate fake.  All risks are yours to take

Then finally just add your fields and makemigrations and migrate

The above might/or not work as it might give some content type errors 




On Wednesday, July 21, 2021 at 2:39:56 AM UTC+8 sebasti...@gmail.com wrote:

> 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 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 the 
>> database? 
>>
>> Thank you
>> ~Salima
>>  
>>
>> On Mon, Jul 19, 2021 at 7:02 PM Aman Vyas  wrote:
>>
>>> 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 python manage.py makemigrations
>>>
>>>
>>>
>>>
>>> On Mon, Jul 19, 2021 at 6:07 AM Salima Begum <
>>> sali...@rohteksolutions.com> wrote:
>>>
 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 server after adding new field 
 and deployed into server.

 ```
 psycopg2.errors.UndefinedColumn: column 
 shopping_ls_product_search.quality_prdct does not exist
 LINE 1: ... Col1 FROM "shopping_ls_product_search" WHERE ("shopping_...
 ```
 Thank you
 ~Salima

 -- 
 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/CAMSz6bnLkeN001UnxO3PdCg06Jc%3Dcr22kZXc71KL4w5CbYq_Cw%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.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/CAKZY6%3DAgrWzCmrBHpouSJG_Vfy7i6LQu81Q7EWBRq44Yf3053A%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.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CAMSz6bmQ5KAQ2SFHCMbf8UHkg34itZPFZ1OksP-2C3t5wAwTJQ%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f8458021-e0c0-4c30-8188-0c08932b1deen%40googlegroups.com.


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 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 the
> database?
>
> Thank you
> ~Salima
>
>
> On Mon, Jul 19, 2021 at 7:02 PM Aman Vyas  wrote:
>
>> 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 python manage.py makemigrations
>>
>>
>>
>>
>> On Mon, Jul 19, 2021 at 6:07 AM Salima Begum <
>> salim...@rohteksolutions.com> wrote:
>>
>>> 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 server after adding new field
>>> and deployed into server.
>>>
>>> ```
>>> psycopg2.errors.UndefinedColumn: column
>>> shopping_ls_product_search.quality_prdct does not exist
>>> LINE 1: ... Col1 FROM "shopping_ls_product_search" WHERE ("shopping_...
>>> ```
>>> Thank you
>>> ~Salima
>>>
>>> --
>>> 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+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAMSz6bnLkeN001UnxO3PdCg06Jc%3Dcr22kZXc71KL4w5CbYq_Cw%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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAKZY6%3DAgrWzCmrBHpouSJG_Vfy7i6LQu81Q7EWBRq44Yf3053A%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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMSz6bmQ5KAQ2SFHCMbf8UHkg34itZPFZ1OksP-2C3t5wAwTJQ%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKGT9mzq338zK1xFhEH_xZWf7AM7jiWEEANrnoPdSW--Kpu-Ng%40mail.gmail.com.


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 the
database?

Thank you
~Salima


On Mon, Jul 19, 2021 at 7:02 PM Aman Vyas  wrote:

> 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 python manage.py makemigrations
>
>
>
>
> On Mon, Jul 19, 2021 at 6:07 AM Salima Begum 
> wrote:
>
>> 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 server after adding new field
>> and deployed into server.
>>
>> ```
>> psycopg2.errors.UndefinedColumn: column
>> shopping_ls_product_search.quality_prdct does not exist
>> LINE 1: ... Col1 FROM "shopping_ls_product_search" WHERE ("shopping_...
>> ```
>> Thank you
>> ~Salima
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAMSz6bnLkeN001UnxO3PdCg06Jc%3Dcr22kZXc71KL4w5CbYq_Cw%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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAKZY6%3DAgrWzCmrBHpouSJG_Vfy7i6LQu81Q7EWBRq44Yf3053A%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMSz6bmQ5KAQ2SFHCMbf8UHkg34itZPFZ1OksP-2C3t5wAwTJQ%40mail.gmail.com.


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 python manage.py makemigrations




On Mon, Jul 19, 2021 at 6:07 AM Salima Begum 
wrote:

> 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 server after adding new field
> and deployed into server.
>
> ```
> psycopg2.errors.UndefinedColumn: column
> shopping_ls_product_search.quality_prdct does not exist
> LINE 1: ... Col1 FROM "shopping_ls_product_search" WHERE ("shopping_...
> ```
> Thank you
> ~Salima
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMSz6bnLkeN001UnxO3PdCg06Jc%3Dcr22kZXc71KL4w5CbYq_Cw%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKZY6%3DAgrWzCmrBHpouSJG_Vfy7i6LQu81Q7EWBRq44Yf3053A%40mail.gmail.com.


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 Jul 2021 at 07:07, Salima Begum 
> wrote:
>
>> 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 server after adding new field
>> and deployed into server.
>>
>> ```
>> psycopg2.errors.UndefinedColumn: column
>> shopping_ls_product_search.quality_prdct does not exist
>> LINE 1: ... Col1 FROM "shopping_ls_product_search" WHERE ("shopping_...
>> ```
>> Thank you
>>
>> ~Salima
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAMSz6bnLkeN001UnxO3PdCg06Jc%3Dcr22kZXc71KL4w5CbYq_Cw%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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAE0AZG%2BYtazYX-YEG-xpKxuX0wHdWjd1B6m%3DEDfaEcoDGMv3-w%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAObPVPAg%3D4HUx%2BNrWVRTwqt%2BVSg2pmqBH%3DfVRLDdiOw7fxxihA%40mail.gmail.com.


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 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 server after adding new field
> and deployed into server.
>
> ```
> psycopg2.errors.UndefinedColumn: column
> shopping_ls_product_search.quality_prdct does not exist
> LINE 1: ... Col1 FROM "shopping_ls_product_search" WHERE ("shopping_...
> ```
> Thank you
>
> ~Salima
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMSz6bnLkeN001UnxO3PdCg06Jc%3Dcr22kZXc71KL4w5CbYq_Cw%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE0AZG%2BYtazYX-YEG-xpKxuX0wHdWjd1B6m%3DEDfaEcoDGMv3-w%40mail.gmail.com.


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'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 <
> choudhuryabhishe...@gmail.com> wrote:
>
>> 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 <
>> salim...@rohteksolutions.com> wrote:
>>
>>> 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 server after adding new field
>>> and deployed into server.
>>>
>>> ```
>>> psycopg2.errors.UndefinedColumn: column
>>> shopping_ls_product_search.quality_prdct does not exist
>>> LINE 1: ... Col1 FROM "shopping_ls_product_search" WHERE ("shopping_...
>>> ```
>>> Thank you
>>>
>>> ~Salima
>>>
>>> --
>>> 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+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAMSz6bnLkeN001UnxO3PdCg06Jc%3Dcr22kZXc71KL4w5CbYq_Cw%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> Thanks and regards,
>> Abhishek Choudhury
>> Mobile: +91 7903717967
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CA%2B3kJUY6ZWPYtQtp_gVB9Ax8%3DK%3Dgh_hV%3D_OXfvt1iOv8QnvtHg%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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMSz6b%3DJROx2d1FWj%3DvB7_xZ%2Bwga2_RVPwL_xvfgfdY1%2BFcR-A%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE0AZGKo1UhSexq64jGLXqsPUkiSq3WeSrQ%2BMn13x1Hhm8YrWA%40mail.gmail.com.


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

2021-07-19 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 <
choudhuryabhishe...@gmail.com> wrote:

> 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 <
> salim...@rohteksolutions.com> wrote:
>
>> 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 server after adding new field
>> and deployed into server.
>>
>> ```
>> psycopg2.errors.UndefinedColumn: column
>> shopping_ls_product_search.quality_prdct does not exist
>> LINE 1: ... Col1 FROM "shopping_ls_product_search" WHERE ("shopping_...
>> ```
>> Thank you
>>
>> ~Salima
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAMSz6bnLkeN001UnxO3PdCg06Jc%3Dcr22kZXc71KL4w5CbYq_Cw%40mail.gmail.com
>> 
>> .
>>
> --
> Thanks and regards,
> Abhishek Choudhury
> Mobile: +91 7903717967
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2B3kJUY6ZWPYtQtp_gVB9Ax8%3DK%3Dgh_hV%3D_OXfvt1iOv8QnvtHg%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMSz6b%3DJROx2d1FWj%3DvB7_xZ%2Bwga2_RVPwL_xvfgfdY1%2BFcR-A%40mail.gmail.com.


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

2021-07-19 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:

> 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 server after adding new field
> and deployed into server.
>
> ```
> psycopg2.errors.UndefinedColumn: column
> shopping_ls_product_search.quality_prdct does not exist
> LINE 1: ... Col1 FROM "shopping_ls_product_search" WHERE ("shopping_...
> ```
> Thank you
>
> ~Salima
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMSz6bnLkeN001UnxO3PdCg06Jc%3Dcr22kZXc71KL4w5CbYq_Cw%40mail.gmail.com
> 
> .
>
-- 
Thanks and regards,
Abhishek Choudhury
Mobile: +91 7903717967

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B3kJUY6ZWPYtQtp_gVB9Ax8%3DK%3Dgh_hV%3D_OXfvt1iOv8QnvtHg%40mail.gmail.com.