SQL::DBx::Deploy(3)

NAME
SQL::DBx::Deploy - Deployment support for SQL::DB

VERSION
0.191.0. Development release.

SYNOPSIS
    use SQL::DB;
    use SQL::DBx::Deploy;

    my $db = SQL::DB->connect('dbi:SQLite:dbname=test');

    $db->deploy_file('mysql.yaml');

DESCRIPTION
SQL::DBx::Deploy adds very simple forward-only (re-)deployment support to SQL::DB. The approach is extremely simple, based on the number of statements already executed. SQL::DBx::Deploy keeps track of what has been run through a table in your database called '_deploy'.

You should only ever add new statements to your source yaml file!

METHODS

deploy($arrayref, [$app])
    Deploy the SQL statements in $arrayref which have not already been deployed for application $app (if given, 'default' otherwise). $arrayref is an array of hashrefs containing a single key/value pair. The key must be either sql or perl.

deploy_file($file, [$app])
    Load the YAML text in $file and deploy it using deploy().

last_deploy_id( [$app] )
    Returns the count of all deployment statements for application $app (or 'default').

SEE ALSO
SQL::DB, Moo::Role

AUTHOR
Mark Lawrence <nomad@null.net>

COPYRIGHT AND LICENSE
Copyright (C) 2011 Mark Lawrence <nomad@null.net>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.