From abd4b6c6d8541955f327b4adc50cf2031ebe6781 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 18 Oct 2012 08:58:44 -0500 Subject: Clean up create index migration Signed-off-by: Dan McGee --- main/migrations/0004_add_pkgname_index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main') diff --git a/main/migrations/0004_add_pkgname_index.py b/main/migrations/0004_add_pkgname_index.py index 0aae452..6e23ada 100644 --- a/main/migrations/0004_add_pkgname_index.py +++ b/main/migrations/0004_add_pkgname_index.py @@ -7,12 +7,12 @@ class Migration(SchemaMigration): def forwards(self, orm): db.alter_column('packages', 'maintainer_id', orm['main.package:maintainer']) - db.alter_column('packages', 'pkgname', orm['main.package:pkgname']) + db.create_index('packages', ['pkgname']) def backwards(self, orm): db.alter_column('packages', 'maintainer_id', orm['main.package:maintainer']) - db.alter_column('packages', 'pkgname', orm['main.package:pkgname']) + db.delete_index('packages', ['pkgname']) models = { -- cgit v1.2.3-24-g4f1b