GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
DBIx::Class::Migration::Features(3) User Contributed Perl Documentation DBIx::Class::Migration::Features(3)

DBIx::Class::Migration::Features - Features of DBIx::Class::Migration

This document summarizes the features and developer value of DBIx::Class::Migration and its associated ecosystem.

Standard workflows for creating database versions, updates and downgrades between versions, management of seed data as well as testing and development fixtures are offered.

You can start prototyping with an easy Sqlite database and move up to Mysql or Postgresql with a single switch.

Given an application where its database has evolved over many versions, you can install a database to any version in the history, as well as install development and fixture data for that version.

    dbic-migration install
    dbic-migration install --to_version 5
    dbic-migration populate --fixture_set testing_data

Offers a system to move a database from any one version to any other version. Additionally lets you migrate data between versions and even offers the possibility to migrate between different types of databases

    dbic-migration prepare
    dbic-migration upgrade
    dbic-migration downgrade

Create and manage data in your database. Create sets for testing, development and to manage system or 'seed' data (data that a database needs to properly function, such as a Country list).

    dbic-migration dump_named_sets -fixture_set countries

Data can be properly converted between database versions

Integrates with testing tools like Test::DBIx::Class to make testing your database logic simple.

    #!/usr/bin/env perl

    use Test::Most;
    use Test::DBIx::Class
      -schema_class=>'MyApp::Schema',
      -fixture_class => '::Population',
      qw(Artist Country);

    fixtures_ok ['all_tables'];

    is Country->count, 3, 'Correct Number of Countries';
    ok Artist->first->has_country, 'Artist has a country';

    done_testing;

Automatically create a developer controlled, local database for rapid prototyping and easy administration. Supports Sqlite, MySQL and Postgresql sandboxes.

Plays nice with popular web application development frameworks like Catalyst.

    package MyApp::Web::Model::Schema;

    use Moose;
    extends 'Catalyst::Model::DBIC::Schema';

    __PACKAGE__->meta->make_immutable;
    __PACKAGE__->config(
      traits => ['FromMigration'],
      schema_class => 'MyApp::Schema',
      extra_migration_args => {
        db_sandbox_class => 'DBIx::Class::Migration::MySQLSandbox'},
      install_if_needed => {
        on_install => sub {
          my ($schema, $migration) = @_;
          $migration->populate('all_tables')}},
    );

Core code designed to be easily subclassed for local customizations. However, subclassing is often unneeded for some customizations since you have the ability to control and configure many aspects of the code using init arguments.

Extensively documented and ships with an end to end tutorial that covers everything from creating your first migration, through testing and integration with Catalyst

DBIx::Class::Migration::Tutorial

DBIx::Class::Migration, DBIx::Class::Migration::Tutorial

See DBIx::Class::Migration for author information

See DBIx::Class::Migration for copyright and license information
2020-06-02 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.