Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Foreign key constraints not created #21

Open
philipn opened this issue May 7, 2014 · 0 comments
Open

Foreign key constraints not created #21

philipn opened this issue May 7, 2014 · 0 comments

Comments

@philipn
Copy link

philipn commented May 7, 2014

For some reason, foreign key constraints seem to not be created. I'm guessing this is because contribute_to_class() doesn't create a constraint? Not sure what's going on, as indexes and other stuff is created correctly. This is on Django 1.5.

I haven't had much time to investigate this further, but the following got me up and running with working constraints:

Using south, add follow as an external migration:

SOUTH_MIGRATION_MODULES = {
    'follow': 'utils.external_migrations.follow',  # My local migrations for external apps
}

Then create an initial migration and migrate:

manage.py schemamigration --initial follow manage.py migrate follow

and rinse & repeat for new fields.

philipn added a commit to localwiki/localwiki that referenced this issue May 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant