3

I'm using South to manage my (MySQL) database tables for a Django 1.4 project, its working great.

This is a bit of a newbie question, but I'm now adding sorl.thumbnail (http://sorl-thumbnail.readthedocs.org/en/latest/installation.html#installation) to the list of installed apps in the settings file.

The instructions say that I now have to use syncdb if I'm using a "cached database key value store".

Is it OK to go ahead and use syncdb? I'm not quite sure if my MySQL+South installation counts as one. Will this mess anything up?

LittleBobbyTables
  • 4,361
  • 9
  • 38
  • 67

2 Answers2

1

If i'm not wrong, when you start using south you should never use syncdb again. Instead, you should use schemamigration or other south's specific commands.

Here you can find what you were looking for. I quote here the phrase that should clear your mind:

The main use of schemamigration is when you’ve just finished your shiny new models.py and want to load up your database. In vanilla Django, you’d just run syncdb - however, with migrations, you’ll need a migration to create the tables.

In this scenario, you just run:

./manage.py schemamigration myapp --initial

That will write one big migration to create all the tables for the models in your app; just run ./manage.py migrate to get it in and you’re done in only one more step than syncdb!

Hope it helps!

Community
  • 1
  • 1
marianobianchi
  • 8,238
  • 1
  • 20
  • 24
  • I'm sorry @lciamp. I didn't see your answer when i posted mine. If it bothers you, i can delete it and edit your post, or comment your post to add a link to south documentation. Nevertheless, i read [this](http://meta.stackexchange.com/questions/122411/deleting-an-answer-as-others-poured-the-same-quickly) and think that it is not wrong to post a simmilar answer... i see this all the time here and nobody complains about that.... But again, if you think i'm wrong and give me your point of view, i delete my post and try to add this information in another way.... – marianobianchi Jul 02 '12 at 04:00
  • sorry for being a dick. I was in a bad mood last night. I went through your profile and up-voted all your correct answers. Sorry again ;) – lciamp Jul 02 '12 at 20:17
  • ;) no problem... thanks for your honesty... we all have bad days, and sometimes we get ungry with the wrong person... cheers! – marianobianchi Jul 02 '12 at 21:25
-2

syncdb does not interfere with South, in fact, in order to install a new app you should always use syncdb first, then apply south for migrations if you have any. So, yes, you are not going to have any problem.

PepperoniPizza
  • 8,842
  • 9
  • 58
  • 100