This is more of a heads up than a question.

The migrations in OSQA appear to be missing the create_unique statements required to support unique_together constraints. For example, migration 0042_auto__add_userproperty creates the forum_userproperty table but does not create the unique_together constraint. According to the South developers, this means that the version of South used to generate the migration scripts is most likely buggy.

See: http://groups.google.com/group/south-users/browse_thread/thread/fe92703d787e870f

asked 20 Jul '10, 16:28

Nathan%20Auch's gravatar image

Nathan Auch
22151116
accept rate: 25%


That should be probably the cause. And since that one is a recent migration, we'll probably create one optional migration to ensure that the constraints are created. This detail only affects database performance, although very residual since both postgres and mysql should be able to optimize the queries, even though there is no compound unique constraint, since unless there is some catastrophe the code should not produce duplicate entries.

Thanks for noticing it.

link

answered 20 Jul '10, 19:47

Hernani%20Cerqueira's gravatar image

Hernani Cerq... ♦♦
16.8k65975
accept rate: 52%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×37

Asked: 20 Jul '10, 16:28

Seen: 748 times

Last updated: 20 Jul '10, 19:47

powered by OSQA