Skip to content

Commit

Permalink
(no ticket) Reverted oi/0004 migration to autogenerated
Browse files Browse the repository at this point in the history
The committed version had delete_index statements removed,
but they had to be deleted to workaround a bug in South
and it broke PostgreSQL.

See also:
https://bitbucket.org/andrewgodwin/south/pull-request/146/re-create-non-unique-indexes-in/diff

To temporarily use the fixed version, it was added to setup.py.
This should be removed once a fixed South version is released.

Change-Id: Icaccbeca473d9fc107954584ce5dcc8f44a5703a
  • Loading branch information
accek committed Oct 19, 2013
1 parent afd5041 commit 58cfd73
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
class Migration(SchemaMigration):

def forwards(self, orm):
# Removing index on 'School', fields ['province']
db.delete_index(u'oi_school', ['province'])

# Removing index on 'School', fields ['city']
db.delete_index(u'oi_school', ['city'])

# Adding index on 'School', fields ['city', 'is_active']
db.create_index(u'oi_school', ['city', 'is_active'])

Expand All @@ -22,6 +28,12 @@ def backwards(self, orm):
# Removing index on 'School', fields ['city', 'is_active']
db.delete_index(u'oi_school', ['city', 'is_active'])

# Adding index on 'School', fields ['city']
db.create_index(u'oi_school', ['city'])

# Adding index on 'School', fields ['province']
db.create_index(u'oi_school', ['province'])


models = {
u'auth.group': {
Expand Down Expand Up @@ -120,4 +132,4 @@ def backwards(self, orm):
}
}

complete_apps = ['oi']
complete_apps = ['oi']
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
install_requires=[
"Django>=1.5",
"pytz>=2013b",
"South>=0.8,<2.0",
"South>=0.8.2.1accek,<2.0",
"BeautifulSoup",
"PyYAML",
"django-nose",
Expand Down Expand Up @@ -74,6 +74,7 @@
'http://github.com/sio2project/filetracker/zipball/master#egg=filetracker-1.0.dev',
'http://github.com/mitsuhiko/werkzeug/zipball/master#egg=Werkzeug-dev',
'http://bitbucket.org/mdebski/django-output-validator-1.5/get/django-1.5.zip#egg=django-output-validator-1.5md1',
'http://bitbucket.org/accek/south/get/1869a1c4024e.zip#egg=South-0.8.2.1accek',
],
entry_points = {
'console_scripts': [
Expand Down

0 comments on commit 58cfd73

Please sign in to comment.