Squashed migration showing unapplied in python3 but applied in python2

2022-03-11 Thread Vaibhav lodha
, it keeps on applying them even if they are already applied. We even tried faking the migration, but under the hood it faked the migrations inside of squashed migration instead of squashed migration itself. Do we have any idea how to fix this? -- You received this message because you

Re: Squashed migration

2015-06-15 Thread aRkadeFR
Great. Thanks for the feedback :) On 06/15/2015 02:18 PM, Cherie Pun wrote: Hi, So the original problem was that I was running in the repo which didn't have the squashed migration. Django does know when to switch to the squashed migrations when you have both squashed and unsquashed

Re: Squashed migration

2015-06-15 Thread Cherie Pun
Hi, So the original problem was that I was running in the repo which didn't have the squashed migration. Django does know when to switch to the squashed migrations when you have both squashed and unsquashed migration files coexist in the folder. As for the syntax error it was because python

Re: Squashed migration

2015-06-15 Thread aRkadeFR
wrote: On 06/12/2015 06:32 AM, aRkadeFR wrote: You need to delete your old migrations so it uses only the squashed one after. No, the squashed migration should be used in place of the old ones for any new database, even if the old ones are still present. This is the point of the squashmigrations

Re: Squashed migration

2015-06-12 Thread Carl Meyer
Hi Cherie, On 06/12/2015 06:32 AM, Cherie Pun wrote: > Thanks for your replies! I am still on Django 1.7 but we are hoping to > upgrade to 1.8 soon. I manage to use the squashed migrations when > creating the test database now, Do you know why it didn't work initially? That'd be useful to know,

Re: Squashed migration

2015-06-12 Thread Carl Meyer
On 06/12/2015 06:32 AM, aRkadeFR wrote: > You need to delete your old migrations so it uses only the squashed > one after. No, the squashed migration should be used in place of the old ones for any new database, even if the old ones are still present. This is the point of the squashmigr

Re: Squashed migration

2015-06-12 Thread aRkadeFR
Hey, You need to delete your old migrations so it uses only the squashed one after. In the documentation: "This enables you to squash and not mess up systems currently in production that aren’t fully up-to-date yet. The recommended process is to squash, keeping the old files, commit and

Re: Squashed migration

2015-06-12 Thread Cherie Pun
Hi, Thanks for your replies! I am still on Django 1.7 but we are hoping to upgrade to 1.8 soon. I manage to use the squashed migrations when creating the test database now, but there's syntax error in the automatically generated squash migration. The error occurs on the line on which it

Re: Squashed migration

2015-06-12 Thread Filipe Ximenes
Hi Cherie, maybe you can run your tests without the migrations. This django app may solve your problem: https://github.com/henriquebastos/django-test-without-migrations/ On Fri, Jun 12, 2015 at 6:38 AM, Cherie Pun wrote: > Hi, > > I have trying to experiment with

Re: Squashed migration

2015-06-12 Thread Erik Cederstrand
> Den 12/06/2015 kl. 11.38 skrev Cherie Pun >: > > Hi, > > I have trying to experiment with squashmigration to see if it will make it > faster to build the database when running tests. So I have squashed the > migrations following

Squashed migration

2015-06-12 Thread Cherie Pun
Hi, I have trying to experiment with squashmigration to see if it will make it faster to build the database when running tests. So I have squashed the migrations following the instructions on the Django website. However when I run the tests, it still uses the original migrations. I thought

Re: Slowness of the resulting squashed migration

2015-04-27 Thread aRkadeFR
ond model including the FK to the first model and finally adds the field to the first model pointing to the second model [1]. Bottom line: if you find a way to optimize something in your squashed migration, feel free to go ahead. It would be helpful if you report this as an enhance to our issue trac

Re: Slowness of the resulting squashed migration

2015-04-24 Thread Markus Holtermann
. Django first adds one model without the ForeignKey, then the second model including the FK to the first model and finally adds the field to the first model pointing to the second model [1]. Bottom line: if you find a way to optimize something in your squashed migration, feel free to go ahead

Slowness of the resulting squashed migration

2015-04-24 Thread aRkadeFR
Hello, After working on a project and having around 10 migrations per app, I wanted to refactor some migrations (of the same app) into only one and have a faster migrations while testing. I did squashmigrations on many of the migrations, but the resulting squased migration is still pretty slow