Hi,

I tried replacing square bracket with % and ran this command the result is
returned as follows. Hope I'm not missing anything. I tried to use app name
in the command but the result is same.

>
> (xxxxx) xxxenv@2332333223:~/xxx/xxxv$ python3 manage.py reset_migrations
>> Traceback (most recent call last):
>>   .......
>> .......
>>
>   File
> "/home/vxxx/vxxx_a/xxxenv/lib/python3.7/site-packages/reset_migrations/management/commands/reset_migrations.py",
> line 44
>     self.cursor.execute("DELETE from django_migrations WHERE app = %s", %
> app)
>                                                                         ^
> SyntaxError: invalid syntax
> (xxxxx) xxxenv@2332333223:~/xxx/xxxv$
>

P.S.
Also I did not understand your second suggestion of this one.
Or check temp file before your actions execute commands migration.

thanks,
~Ram


On Sat, Jun 13, 2020 at 12:25 AM Integr@te System <datacentral...@gmail.com>
wrote:

> Hi Ram,
>
> Plz check line #44 in reset_migrations.py
> try replace square bracket by percent sign.
>
> Or check temp file before your actions execute commands migration.
>
> Goodluck.
>
> On Sat, Jun 13, 2020, 12:31 PM Ram <ram.mullap...@gmail.com> wrote:
>
>> Hi,
>>
>> We clone our project repository from GIT hub and deployed our web
>> application in our development 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
>>
>> 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 >
>>>
>>
>>  But the issue is Postgres database does not show 2 of those new tables
>> and we are not able to find any clue in the postgres database logs other
>> than these log lines.
>>
>> 2020-06-13 02:48:34.627 UTC [7463] vxxx@vyyyy ERROR:  relation
>>> "pages_rim_classifieds_messages" does not exist
>>> ......
>>> 2020-06-13 04:03:54.943 UTC [10103] vxxx@vyyyy ERROR:  relation
>>> "pages_rim_classifieds_messages" does not exist at character 35
>>> 2020-06-13 04:03:54.943 UTC [10103] vxxx@vyyyy STATEMENT:  SELECT
>>> COUNT(*) AS "__count" FROM "pages_rim_classifieds_messages" WHERE
>>> ("pages_rim_classifieds_messages"."To" IS NULL AND
>>> "pages_rim_classifieds_messages"."flag" = 'u')
>>> 2020-06-13 04:03:54.965 UTC [10103] vxxx@vyyyy ERROR:  relation
>>> "pages_rim_classifieds_messages" does not exist at character 475
>>> 2020-06-13 04:03:54.965 UTC [10103] vxxx@vyyyy STATEMENT:  SELECT
>>> "pages_rim_classifieds_messages"."id",
>>> "pages_rim_classifieds_messages"."adv_id",
>>> "pages_rim_classifieds_messages"."message",
>>> "pages_rim_classifieds_messages"."username",
>>> "pages_rim_classifieds_messages"."flag",
>>> "pages_rim_classifieds_messages"."status",
>>> "pages_rim_classifieds_messages"."addedon",
>>> "pages_rim_classifieds_messages"."From",
>>> "pages_rim_classifieds_messages"."To",
>>> "pages_rim_classifieds_messages"."ttle",
>>> "pages_rim_classifieds_messages"."delete" FROM
>>> "pages_rim_classifieds_messages" WHERE
>>> ("pages_rim_classifieds_messages"."To" IS NULL AND
>>> "pages_rim_classifieds_messages"."flag" = 'u') LIMIT 21
>>>
>>>
>> I appreciate if someone can give us some clue if we are missing anything?
>>
>> Best regards,
>> ~Ram
>>
>>
>>
>>
>>
>> --
>> 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%2BOi5F0rWEhv9c%3Dc9q_%3D6qwUAFuLwRHVc1sPBTjtKbtkHpuoBQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CA%2BOi5F0rWEhv9c%3Dc9q_%3D6qwUAFuLwRHVc1sPBTjtKbtkHpuoBQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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/CAP5HUWqm-XF3mnzxrf8-j7BVt1zjDbx1qsot5%2BkjNrDxXAf7kw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAP5HUWqm-XF3mnzxrf8-j7BVt1zjDbx1qsot5%2BkjNrDxXAf7kw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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%2BOi5F1OtuLoeNJ_MBSaD%3Dp8xTARZvnWcHzMg1ijQjiP9-h7aw%40mail.gmail.com.

Reply via email to