From 59b65a24cec4ac67848293297f3bb1bd6cf99872 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Tue, 7 Oct 2008 12:31:46 +0200 Subject: [PATCH] Removed old migrations (older than south). --- migrations/001_add_book_count_to_shelf.py | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 migrations/001_add_book_count_to_shelf.py diff --git a/migrations/001_add_book_count_to_shelf.py b/migrations/001_add_book_count_to_shelf.py deleted file mode 100644 index 4af55a172..000000000 --- a/migrations/001_add_book_count_to_shelf.py +++ /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() -- 2.20.1