willhardy / django-seo

Provides a set of tools for managing Search Engine Optimisation (SEO) for Django sites.
BSD 3-Clause "New" or "Revised" License
251 stars 117 forks source link

It's hard to migrate an existing Metadata model #31

Open mandx opened 12 years ago

mandx commented 12 years ago

When working on a site, now a new requirement is included, support for multiple sites. This is Ok, django.contrib.sites is fine and DjangoSEO supports this via the Metadata.Meta.use_sites attribute. But if the site is initially deployed with Metadata.Meta.use_sites = False, when setting this to True of course there's a missing column _site_id.

Of course, quickly South comes to my mind, but there's a problem: DjangoSEO is not using migration, and migrations are stored in the app directory, so it would be tinkering with a package inside the site-packages directory.

However I can think on associate the Metadata models with the apps that contains the seo.py module, since the models are being created dynamically, and then the migrations would be inside the VCS tracked app. The developer can change settings, inspect changes with South, generate an apply migrations, all under his app scope.