DBIx-Auto-Migrate

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

                           UNIQUE(username)
                   )',
           );
    }

Returns a list of migrations, creating a options table in the first migration is
obligatory since it is internally used to keep track of the current migration number.

## dsn

    sub dsn {
           return 'dbi:Pg:dbname=my_fancy_app_db';
    }

Returns a valid DSN for [DBI](https://metacpan.org/pod/DBI), you can use any logic to return this, even reading a database config file.

## user

    sub user { 'mydbuser' }

Returns a valid user for [DBI](https://metacpan.org/pod/DBI), you can use any logic to return this, even reading a database config file.

## pass

    sub pass { 'mypass' }

Returns a valid password for [DBI](https://metacpan.org/pod/DBI), you can use any logic to return this, even reading a database config file.

## extra

    sub extra {
           {
                   PrintError => 1,
           }
    }

You can optionally implement this method to pass extra options to [DBI](https://metacpan.org/pod/DBI), the
return must be a hashref or undef.

# FINALIZING THE DATABASE WRAPPER CLASS

    finish_auto_migrate();

Calling this method will ensure your class is completely ready to be used,
you can do it at any point if every prerequisite is available.

# METHODS AUTOMATICALLY AVAILABLE IN YOUR WRAPPER

## connect

    my $dbh = MyCompany::DB->connect;

Same as [DBI](https://metacpan.org/pod/DBI)::`connect` but without taking any argument.

## connect\_cached

    my $dbh = MyCompany::DB->connect_cached;

Same as [DBI](https://metacpan.org/pod/DBI)::`connect_cached` but without taking any argument.

# BUGS AND LIMITATIONS

Tries to be database independent, but I cannot really ensure it.

More testing is needed.

# AUTHOR

SERGIOXZ - Sergio Iglesias

# CONTRIBUTORS

SERGIOXZ - Sergio Iglesias

# COPYRIGHT

Copyright © Sergio Iglesias (2025)

# LICENSE

This library is free software and may be distributed under the same terms
as perl itself. See [https://dev.perl.org/licenses/](https://dev.perl.org/licenses/).



( run in 3.419 seconds using v1.01-cache-2.11-cpan-75ffa21a3d4 )