damned-lies r1229 - in trunk: . docs stats



Author: stephaner
Date: Fri Dec 19 20:38:05 2008
New Revision: 1229
URL: http://svn.gnome.org/viewvc/damned-lies?rev=1229&view=rev

Log:
2008-12-19  StÃphane Raimbault  <stephane raimbault gmail com>

	* docs/notes-upgrade.txt: Added note.
	* stats/models.py: Added unique constraint on (branch, domain,
	language) to Statistics table.


Modified:
   trunk/ChangeLog
   trunk/docs/notes-upgrade.txt
   trunk/stats/models.py

Modified: trunk/docs/notes-upgrade.txt
==============================================================================
--- trunk/docs/notes-upgrade.txt	(original)
+++ trunk/docs/notes-upgrade.txt	Fri Dec 19 20:38:05 2008
@@ -1,6 +1,5 @@
-r1226
-
-Add this relation to Team to be able to run the snippet
+# r1226
+Add this attribute to Team to be able to run the snippet:
 coordinator = models.ForeignKey(Person)
 
 ./manage.py shell
@@ -12,7 +11,11 @@
     r = Role(team=t, person=p, role='coordinator')
     r.save()
 
-Remove the previous attribute.
+Remove the previous added attribute.
 
 SQL command
 ALTER TABLE team DROP coordinator_id;
+
+
+# r1229
+ALTER TABLE statistics ADD UNIQUE ("branch_id", "domain_id", "language_id");

Modified: trunk/stats/models.py
==============================================================================
--- trunk/stats/models.py	(original)
+++ trunk/stats/models.py	Fri Dec 19 20:38:05 2008
@@ -132,7 +132,7 @@
         db_table = 'branch'
         verbose_name_plural = 'branches'
         ordering = ('name',)
-        unique_together = ("name", "module")
+        unique_together = ('name', 'module')
 
     def __unicode__(self):
         return "%s (%s)" % (self.name, self.module)
@@ -808,7 +808,7 @@
     class Meta:
         db_table = 'category'
         verbose_name_plural = 'categories'
-        unique_together = ("release", "branch")
+        unique_together = ('release', 'branch')
 
     def __unicode__(self):
         return "%s (%s, %s)" % (self.get_name_display(), self.release, self.branch)
@@ -834,6 +834,7 @@
         db_table = 'statistics'
         verbose_name = "statistics"
         verbose_name_plural = verbose_name
+        unique_together = ('branch', 'domain', 'language')
 
     def __init__(self, *args, **kwargs):
         models.Model.__init__(self, *args, **kwargs)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]