NAME |
Synopsis |
Description |
Distributions |
Constructor and initialization |
Required Modules |
Changes |
Author |
Copyright |
NAME
Synopsisuse DBIx::Admin::CreateTrivialSchema; DBIx::Admin::CreateTrivialSchema -> new
(
dbh => $dbh,
not_null => 1,
schema => {t_a => [col_a, col_b], t_z => [col_z]},
type => 'char(2)',
verbose => 1,
);
Description
Given a hashref of tables and columns per table, it creates SQL create statements, and executes them. The above schema would create and execute these SQL statements:
Any pre-existing tables with the same names are dropped first. Ensure your backups are up-to-date! It should be obvious that this module is mindless in that all columns in all tables are given the same type, the same 'not null' option, and the same default value. This module is designed to use the output of So, the combined effect of these 2 modules is that you backup a database to XML with
This enables you to get the data into some sort of schema when the create statements used to create the original schema are not available on the target platform. For instance, use this technique when you want to dump data from MS Access into Postgres under GNU/Linux. This module is recommended instead of my previous attempt: See also: http://savage.net.au/Ron/html/msaccess2rdbms.html For a more sophisticated migration technique, see: http://dev.mysql.com/tech-resources/articles/migrating-from-microsoft.html DistributionsThis module is available both as a Unix-style distro (*.tgz) and an ActiveState-style distro (*.ppd). The latter is shipped in a *.zip file. See http://savage.net.au/Perl-modules.html for details. See http://savage.net.au/Perl-modules/html/installing-a-module.html for help on unpacking and installing each type of distro. Constructor and initializationnew(...) returns an object of type This is the class's contructor. Usage: DBIx::Admin::CreateTrivialSchema -> new(). This method takes a set of parameters. For each parameter you wish to use, call new as new(param_1 => value_1, ...).
Required ModulesChangesSee Changes.txt. Author
Home page: http://savage.net.au/index.html CopyrightAustralian copyright © 2005, Ron Savage. All rights reserved. All Programs of mine are 'OSI Certified Open Source Software'; you can redistribute them and/or modify them under the terms of The Artistic License, a copy of which is available at: http://www.opensource.org/licenses/index.html |
| Top of page |