The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Jifty::Model::Schema - Tracks in-db schema version

SYNOPSIS

  my $app = Jifty->new(config_file => "$ProjectRoot/etc/config.yml");
  my $schema = Jifty::Model::Schema->new;
  my $db_version = $schema->in_db;

DESCRIPTION

Every Jifty application automatically inherits this table, which describes what version of the schema is in the database currently. This allows Jifty to smartly upgrade between schema versions.

table

Schemas are stored in the table _db_version.

in_db

Returns the version of the schema that is stored in the database, as a version object.

update VERSION

Updates the version number of the schema that is stored in the database; VERSION should be a version object. Note that this does not actually update the tables and column themselves, merely the number that is recorded as the current version! See Jifty::Script::Schema for the program that updates schemas.