Permalink
Browse files

not indexing properties which do not need it

  • Loading branch information...
1 parent bbf0b3a commit ada8d34204124b7d769d818547530ffa65e13615 @nlake44 committed Sep 20, 2011
View
@@ -0,0 +1 @@
+.svn*
@@ -44,15 +44,15 @@
"""
class Accounts(db.Model):
email = db.EmailProperty(required=True)
- password = db.StringProperty(required=True);
+ password = db.StringProperty(required=True, indexed=False);
isEnabled = db.StringProperty(required=True, choices=ACCOUNT_STATUS.RANGE_OF_VALUES)
- creationDate = db.DateTimeProperty(auto_now_add=True)
- modifiedDate = db.DateTimeProperty(auto_now=True)
+ creationDate = db.DateTimeProperty(auto_now_add=True, indexed=False)
+ modifiedDate = db.DateTimeProperty(auto_now=True, indexed=False)
accountType = db.StringProperty(required=True,
- choices=set(ACCOUNT_TYPES))
+ choices=set(ACCOUNT_TYPES), indexed=False)
paymentType = db.StringProperty(required=True,
- choices=set(PAYMENT_TYPES))
- cookieKey = db.StringProperty(required=True)
+ choices=set(PAYMENT_TYPES), indexed=False)
+ cookieKey = db.StringProperty(required=True, indexed=False)
apiKey = db.StringProperty(required=True)
trophyWidget = db.ReferenceProperty(required=True, reference_class=TrophyCase)
@@ -62,20 +62,20 @@ class Accounts(db.Model):
milestoneWidget = db.ReferenceProperty(reference_class=Milestones)
leaderWidget = db.ReferenceProperty(reference_class=Leaderboard)
- lastPayment = db.StringProperty()
- firstName = db.StringProperty()
- lastName = db.StringProperty()
- address = db.StringProperty()
- city = db.StringProperty()
- phoneNumber = db.StringProperty()
- state = db.StringProperty()
- country = db.StringProperty()
- comments = db.TextProperty()
- receiveMarketEmails = db.BooleanProperty()
- receiveAnalysisEmails = db.BooleanProperty()
- pointsTrackingPeriod = db.StringProperty(choices=set(["daily","weekly", "monthly"] ))
- lastPointsReset = db.DateTimeProperty()
- notifyOnPoints = db.BooleanProperty(default=True)
+ lastPayment = db.StringProperty(indexed=False)
+ firstName = db.StringProperty(indexed=False)
+ lastName = db.StringProperty(indexed=False)
+ address = db.StringProperty(indexed=False)
+ city = db.StringProperty(indexed=False)
+ phoneNumber = db.StringProperty(indexed=False)
+ state = db.StringProperty(indexed=False)
+ country = db.StringProperty(indexed=False)
+ comments = db.TextProperty(indexed=False)
+ receiveMarketEmails = db.BooleanProperty(indexed=False)
+ receiveAnalysisEmails = db.BooleanProperty(indexed=False)
+ pointsTrackingPeriod = db.StringProperty(choices=set(["daily","weekly", "monthly"] ), indexed=False)
+ lastPointsReset = db.DateTimeProperty(indexed=False)
+ notifyOnPoints = db.BooleanProperty(default=True, indexed=False)
# TODO do not use iconfinder's CDN, serve it up locally
- pointsImage = db.StringProperty(default="http://cdn4.iconfinder.com/data/icons/prettyoffice/128/add1-.png")
- loginImage = db.StringProperty(default="http://cdn1.iconfinder.com/data/icons/Hosting_Icons/128/secure-server-px-png.png")
+ pointsImage = db.StringProperty(default="http://cdn4.iconfinder.com/data/icons/prettyoffice/128/add1-.png", indexed=False)
+ loginImage = db.StringProperty(default="http://cdn1.iconfinder.com/data/icons/Hosting_Icons/128/secure-server-px-png.png", indexed=False)
@@ -47,11 +47,11 @@
"""
class BadgeImage(db.Model):
image = db.BlobProperty(required=True)
- permissions = db.StringProperty(required=True, choices=set(PERMISSION))
+ permissions = db.StringProperty(required=True, choices=set(PERMISSION), indexed=False)
creator = db.ReferenceProperty(reference_class=Accounts, required=True)
- imgType = db.StringProperty(required=True, choices=set(['jpg','gif','png', 'gif']))
- creationDate = db.DateTimeProperty(auto_now_add=True)
- modifiedDate = db.DateTimeProperty(auto_now=True)
+ imgType = db.StringProperty(required=True, choices=set(['jpg','gif','png', 'gif']), indexed=False)
+ creationDate = db.DateTimeProperty(auto_now_add=True, indexed=False)
+ modifiedDate = db.DateTimeProperty(auto_now=True, indexed=False)
"""
Class: Badges
@@ -71,25 +71,25 @@ class BadgeImage(db.Model):
class Badges(db.Model):
name = db.StringProperty(required=True)
description = db.TextProperty(required=True)
- altText = db.StringProperty(required=True)
- setType = db.StringProperty(required=True, choices=set(TYPES))
+ altText = db.TextProperty(required=True)
+ setType = db.TextProperty(required=True, choices=set(TYPES))
isEnabled = db.StringProperty(required=True, choices=set(BOOLEAN))
- creationDate = db.DateTimeProperty(auto_now_add=True)
- modifiedDate = db.DateTimeProperty(auto_now=True)
+ creationDate = db.DateTimeProperty(auto_now_add=True, indexed=False)
+ modifiedDate = db.DateTimeProperty(auto_now=True, indexed=False)
creator = db.ReferenceProperty(reference_class=Accounts, required=True)
tags = db.StringProperty()
permissions = db.StringProperty(required=True, choices=set(PERMISSION))
- storageType = db.StringProperty(required=True, choices=set(STYPE))
+ storageType = db.StringProperty(required=True, choices=set(STYPE), indexed=False)
# This if you want to make the badge clickable, and route to a resource
# or secret link, etc
- resourceLink = db.LinkProperty()
- downloadLink = db.LinkProperty()
+ resourceLink = db.LinkProperty(indexed=False)
+ downloadLink = db.LinkProperty(indexed=False)
# a reference key to the object stored into the blobstore
blobKey = blobstore.BlobReferenceProperty()
- imageKey = db.ReferenceProperty(reference_class=BadgeImage)
+ imageKey = db.ReferenceProperty(reference_class=BadgeImage, indexed=False)
# Uploaded files in static images of badges
- filePath = db.StringProperty()
- theme = db.StringProperty()
+ filePath = db.StringProperty(indexed=False)
+ theme = db.StringProperty(indexed=False)
"""
Class: BadgeInstance
@@ -102,14 +102,14 @@ class BadgeInstance(db.Model):
userRef = db.ReferenceProperty(reference_class=Users, required=True)
awarded = db.StringProperty(required=True, choices=set(BOOLEAN))
permissions = db.StringProperty(required=True, choices=set(PERMISSION))
- creationDate = db.DateTimeProperty(auto_now_add=True)
- awardDateTime = db.DateTimeProperty()
- awardDate = db.DateProperty()
- modifiedDate = db.DateTimeProperty(auto_now=True)
- instanceRegistrationDate = db.DateTimeProperty(auto_now=True)
- pointsRequired = db.IntegerProperty(default=9999999999)
- pointsEarned = db.IntegerProperty(default=0)
- expirationDate = db.DateTimeProperty()
- resource = db.LinkProperty()
- reason = db.StringProperty()
- downloadLink = db.LinkProperty()
+ creationDate = db.DateTimeProperty(auto_now_add=True, indexed=False)
+ awardDateTime = db.DateTimeProperty(indexed=False)
+ awardDate = db.DateProperty(indexed=False)
+ modifiedDate = db.DateTimeProperty(auto_now=True, indexed=False)
+ instanceRegistrationDate = db.DateTimeProperty(auto_now=True, indexed=False)
+ pointsRequired = db.IntegerProperty(default=9999999999, indexed=False)
+ pointsEarned = db.IntegerProperty(default=0, indexed=False)
+ expirationDate = db.DateTimeProperty(indexed=False)
+ resource = db.LinkProperty(indexed=False)
+ reason = db.StringProperty(indexed=False)
+ downloadLink = db.LinkProperty(indexed=False)
@@ -20,21 +20,21 @@
class APICountBatch(db.Model):
date = db.DateTimeProperty()
account_key = db.StringProperty()
- counter = db.IntegerProperty(default=0)
+ counter = db.IntegerProperty(default=0, indexed=False)
class PointBatch(db.Model):
date = db.DateTimeProperty()
account_key = db.StringProperty()
- counter = db.IntegerProperty(default=0)
+ counter = db.IntegerProperty(default=0, indexed=False)
class BadgePointsBatch(db.Model):
date = db.DateTimeProperty()
account_key = db.StringProperty()
badgeid = db.StringProperty()
- counter = db.IntegerProperty(default=0)
+ counter = db.IntegerProperty(default=0, indexed=False)
class BadgeBatch(db.Model):
date = db.DateTimeProperty()
account_key = db.StringProperty()
badgeid = db.StringProperty()
- counter = db.IntegerProperty(default=0)
+ counter = db.IntegerProperty(default=0, indexed=False)
@@ -25,14 +25,14 @@
class Users(db.Model):
userid = db.StringProperty(required=True)
isEnabled = db.StringProperty(required=True, choices=set(["yes","no"]))
- creationDate = db.DateTimeProperty(auto_now_add=True)
- modifiedDate = db.DateTimeProperty(auto_now=True)
+ creationDate = db.DateTimeProperty(auto_now_add=True, indexed=False)
+ modifiedDate = db.DateTimeProperty(auto_now=True, indexed=False)
accountRef = db.ReferenceProperty(reference_class=Accounts, required=True)
- points = db.IntegerProperty(default=0)
+ points = db.IntegerProperty(default=0, indexed=False)
rank = db.IntegerProperty(default=constants.NOT_RANKED)
- last_time_ranked = db.DateTimeProperty()
- profileName = db.StringProperty(default="Anonymous")
- profileLink = db.TextProperty()
- profileImg = db.TextProperty(default="http://i.imgur.com/hsDiZ.jpg")
- userNotes = db.TextProperty()
+ last_time_ranked = db.DateTimeProperty(indexed=False)
+ profileName = db.StringProperty(default="Anonymous", indexed=False)
+ profileLink = db.TextProperty(indexed=False)
+ profileImg = db.TextProperty(default="http://i.imgur.com/hsDiZ.jpg", indexed=False)
+ userNotes = db.TextProperty(indexed=False)
tags = db.StringProperty()
Oops, something went wrong. Retry.

0 comments on commit ada8d34

Please sign in to comment.