Oops, we need 412 bytes to store a percentiler's data.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@426 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Michael Bayne
2007-09-11 02:20:30 +00:00
parent 27c8eac61c
commit e95d0aa58f
2 changed files with 8 additions and 1 deletions
@@ -23,6 +23,7 @@ package com.threerings.parlor.rating.server.persist;
import com.samskivert.jdbc.depot.Key; import com.samskivert.jdbc.depot.Key;
import com.samskivert.jdbc.depot.PersistentRecord; import com.samskivert.jdbc.depot.PersistentRecord;
import com.samskivert.jdbc.depot.annotation.Column;
import com.samskivert.jdbc.depot.annotation.Id; import com.samskivert.jdbc.depot.annotation.Id;
import com.samskivert.jdbc.depot.expression.ColumnExp; import com.samskivert.jdbc.depot.expression.ColumnExp;
@@ -57,7 +58,7 @@ public class PercentileRecord extends PersistentRecord
// AUTO-GENERATED: FIELDS END // AUTO-GENERATED: FIELDS END
/** Increment this value to reflect changes to this object's schema. */ /** Increment this value to reflect changes to this object's schema. */
public static final int SCHEMA_VERSION = 1; public static final int SCHEMA_VERSION = 2;
/** The id of the game for which we're tracking a percentile distribution. */ /** The id of the game for which we're tracking a percentile distribution. */
@Id @Id
@@ -68,6 +69,7 @@ public class PercentileRecord extends PersistentRecord
public int type; public int type;
/** The raw percentiler data. */ /** The raw percentiler data. */
@Column(length=500)
public byte[] data; public byte[] data;
// AUTO-GENERATED: METHODS START // AUTO-GENERATED: METHODS START
@@ -30,6 +30,7 @@ import com.samskivert.util.HashIntMap;
import com.samskivert.util.IntMap; import com.samskivert.util.IntMap;
import com.samskivert.jdbc.depot.DepotRepository; import com.samskivert.jdbc.depot.DepotRepository;
import com.samskivert.jdbc.depot.EntityMigration;
import com.samskivert.jdbc.depot.PersistenceContext; import com.samskivert.jdbc.depot.PersistenceContext;
import com.samskivert.jdbc.depot.PersistentRecord; import com.samskivert.jdbc.depot.PersistentRecord;
import com.samskivert.jdbc.depot.clause.Where; import com.samskivert.jdbc.depot.clause.Where;
@@ -49,6 +50,10 @@ public class RatingRepository extends DepotRepository
public RatingRepository (PersistenceContext ctx) public RatingRepository (PersistenceContext ctx)
{ {
super(ctx); super(ctx);
// TEMP
ctx.registerMigration(PercentileRecord.class, new EntityMigration.Retype(2, "data"));
// END TEMP
} }
/** /**