Removed old migrations (older than south).
authorMarek Stępniowski <marek@stepniowski.com>
Tue, 7 Oct 2008 10:31:46 +0000 (12:31 +0200)
committerMarek Stępniowski <marek@stepniowski.com>
Tue, 7 Oct 2008 10:31:46 +0000 (12:31 +0200)
migrations/001_add_book_count_to_shelf.py [deleted file]

diff --git a/migrations/001_add_book_count_to_shelf.py b/migrations/001_add_book_count_to_shelf.py
deleted file mode 100644 (file)
index 4af55a1..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-from django.core.management import setup_environ
-import settings
-
-setup_environ(settings)
-
-from catalogue.models import Tag, Book
-from django.db import connection
-
-query = 'ALTER TABLE catalogue_tag ADD COLUMN book_count integer NOT NULL DEFAULT 0'
-
-cursor = connection.cursor()
-cursor.execute(query)
-
-for shelf in Tag.objects.filter(category='set'):
-    shelf.book_count = len(Book.tagged.with_all(shelf))
-    shelf.save()