# Copyright (c) 1999-2001 bivio Software, Inc. All rights reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: DbUpgrade.pm,v 2.1 2006/10/16 21:08:04 moeller Exp $ package Bivio::Biz::Model::DbUpgrade; use strict; $Bivio::Biz::Model::DbUpgrade::VERSION = sprintf('%d.%02d', q$Revision: 2.1 $ =~ /\d+/g); $_ = $Bivio::Biz::Model::DbUpgrade::VERSION; =head1 NAME Bivio::Biz::Model::DbUpgrade - maintains current database DDL version =head1 RELEASE SCOPE bOP =head1 SYNOPSIS use Bivio::Biz::Model::DbUpgrade; =cut =head1 EXTENDS L =cut use Bivio::Biz::PropertyModel; @Bivio::Biz::Model::DbUpgrade::ISA = ('Bivio::Biz::PropertyModel'); =head1 DESCRIPTION C database upgrade indicator. Applications should create a program, e.g. db-upgrade, which contains the current upgrade. When the upgrade is complete (before the commit), this table should be updated with the CVS revision of the upgrade. Since there is a unique key on db_upgrade_t.version, an upgrade can't run twice. =cut #=IMPORTS #=VARIABLES =head1 METHODS =cut =for html =head2 internal_initialize() : hash_ref B =cut sub internal_initialize { return { version => 1, table_name => 'db_upgrade_t', columns => { # Which version, can be anything, but must be unique version => ['Name', 'PRIMARY_KEY'], # When did the upgrade run? run_date_time => ['DateTime', 'NOT_NULL'], }, }; } #=PRIVATE METHODS =head1 COPYRIGHT Copyright (c) 1999-2001 bivio Software, Inc. All rights reserved. Visit http://www.bivio.biz for more info. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; If not, you may get a copy from: http://www.opensource.org/licenses/lgpl-license.html =head1 VERSION $Id: DbUpgrade.pm,v 2.1 2006/10/16 21:08:04 moeller Exp $ =cut 1;