Annotation Interface Schema
The schema version of a storage record, read by
ModStorage.table(String, Class) and
ModStorage.define(String, Class); TableDefinition.version(int) overrides it. Records without it
have version 1. The migrations from older versions are the record's Migrate methods.
@Schema(version = 2)
record Balance(long coins, @Nullable Instant lastPaid)
{
@Migrate(from = 1)
static Balance fromV1(Row row) {
return new Balance(row.getLong("coins"), null);
}
}
-
Required Element Summary
Required Elements
-
Element Details
-
version
int versionAt least 1.
-