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 migratio

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 can

Re: Squashed migration

2015-06-15 Thread aRkadeFR
Thanks for the good explanation as always :) From the documentation plus the explanation of the problem, I wanted to know if by deleting the old migration it would still run the old migrations. Do we know the end of the story? Where it comes from? Thanks On 06/12/2015 05:42 PM, Carl Meyer wrot

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, i

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 squashmigrations feat

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 releas

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 refere

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 squashmigration to see if it wil

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 the instructions on the Django