DBIx::Class::Schema::Versioned

DBIx::Class::Schema::Versioned is a DBIx::Class::Schema plugin for schema upgrades.
Download

DBIx::Class::Schema::Versioned Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Jess Robinson and Luke Saunders
  • Publisher web site:
  • http://search.cpan.org/~ash/DBIx-Class-0.08099_02/lib/DBIx/Class/Schema/Versioned.pm

DBIx::Class::Schema::Versioned Tags


DBIx::Class::Schema::Versioned Description

DBIx::Class::Schema::Versioned is a DBIx::Class::Schema plugin for schema upgrades. DBIx::Class::Schema::Versioned is a DBIx::Class::Schema plugin for schema upgrades.SYNOPSIS package Library::Schema; use base qw/DBIx::Class::Schema/; # load Library::Schema::CD, Library::Schema::Book, Library::Schema::DVD __PACKAGE__->load_classes(qw/CD Book DVD/); __PACKAGE__->load_components(qw/+DBIx::Class::Schema::Versioned/); __PACKAGE__->upgrade_directory('/path/to/upgrades/'); __PACKAGE__->backup_directory('/path/to/backups/');This module is a component designed to extend DBIx::Class::Schema classes, to enable them to upgrade to newer schema layouts. To use this module, you need to have called create_ddl_dir on your Schema to create your upgrade files to include with your delivery.A table called dbix_class_schema_versions is created and maintained by the module. This contains two fields, 'Version' and 'Installed', which contain each VERSION of your Schema, and the date+time it was installed.The actual upgrade is called manually by calling upgrade on your schema object. Code is run at connect time to determine whether an upgrade is needed, if so, a warning "Versions out of sync" is produced.So you'll probably want to write a script which generates your DDLs and diffs and another which executes the upgrade.NB: At the moment, only SQLite and MySQL are supported. This is due to spotty behaviour in the SQL::Translator producers, please help us by them.Requirements:· Perl Requirements: · Perl


DBIx::Class::Schema::Versioned Related Software