2 from axiom.item import Item
3 from axiom.attributes import text, integer, timestamp
7 # we didn't originally set typeName, so it was generated from the
8 # fully-qualified classname ("diskwatcher.Sample"), then Axiom
9 # automatically lowercases and un-dot-ifies it to get
10 # "diskwatcher_sample". Now we explicitly provide a name.
11 typeName = "diskwatcher_sample"
13 # version 2 added the 'total' field
16 url = text(indexed=True)
17 when = timestamp(indexed=True)
22 def upgradeSample1to2(old):
24 return old.upgradeVersion("diskwatcher_sample", 1, 2,
31 from axiom.upgrade import registerUpgrader
32 registerUpgrader(upgradeSample1to2, "diskwatcher_sample", 1, 2)