From 7f1ccd1cb73cc36668821238661ead1004fe1406 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Tue, 17 May 2011 15:28:13 -0700 Subject: Add metadata table to the wallet database Add a metadata table whose only column, currently, is a version number. We will store the version of the schema in this table and use that to know what to do during upgrades. --- perl/Wallet/Schema.pm | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'perl/Wallet') diff --git a/perl/Wallet/Schema.pm b/perl/Wallet/Schema.pm index 25d48cf..07e5ffe 100644 --- a/perl/Wallet/Schema.pm +++ b/perl/Wallet/Schema.pm @@ -1,7 +1,8 @@ # Wallet::Schema -- Database schema for the wallet system. # # Written by Russ Allbery -# Copyright 2007, 2008, 2010 Board of Trustees, Leland Stanford Jr. University +# Copyright 2007, 2008, 2010, 2011 +# The Board of Trustees of the Leland Stanford Junior University # # See LICENSE for licensing terms. @@ -20,7 +21,7 @@ use DBI; # This version should be increased on any code change to this module. Always # use two digits for the minor version with a leading zero if necessary so # that it will sort properly. -$VERSION = '0.06'; +$VERSION = '0.07'; ############################################################################## # Data manipulation @@ -135,7 +136,7 @@ Wallet::Schema - Database schema for the wallet system =for stopwords SQL ACL API APIs enums Enums Keytab Backend keytab backend enctypes -enctype Allbery +enctype Allbery Metadata metadata =head1 SYNOPSIS @@ -190,6 +191,19 @@ empty database. =head1 SCHEMA +=head2 Metadata Tables + +This table is used to store metadata about the wallet database, used for +upgrades and in similar situations: + + create table metadata + (md_version integer); + insert into metadata (md_version) values (1); + +This table will normally only have one row. md_version holds the version +number of the schema (which does not necessarily have any relationship to +the version number of wallet itself). + =head2 Normalization Tables The following are normalization tables used to constrain the values in -- cgit v1.2.3