.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "PGObject::Util::DBChange 3pm" .TH PGObject::Util::DBChange 3pm "2019-12-27" "perl v5.30.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" PGObject::Util::DBChange \- Track applied change files in the database .SH "VERSION" .IX Header "VERSION" Version 0.050.4 .SH "SYNOPSIS" .IX Header "SYNOPSIS" Quick summary of what the module does. .PP Perhaps a little code snippet. .PP .Vb 1 \& use PGObject::Util::DBChange; \& \& my $foo = PGObject::Util::DBChange\->new(); \& ... .Ve .SH "PROPERTIES" .IX Header "PROPERTIES" .SS "path" .IX Subsection "path" Path to load content from \*(-- Must be defined and '' or a string .SS "no_transactions" .IX Subsection "no_transactions" If true, we assume success even if transaction fails .PP Future versions may add additional checking possibilies instead .SS "content" .IX Subsection "content" Content of the file. Can be specified at load, or is built by reading from the file. .SS "succeeded (rwp)" .IX Subsection "succeeded (rwp)" Undefined until run. After run, 1 if success, 0 if failure. .SS "dependencies" .IX Subsection "dependencies" A list of other changes to apply first. If strings are provided, these are turned into path objects. .PP Currently these must be explicitly provided. Future bersions may read these from comments in the files themselves. .SS "sha" .IX Subsection "sha" The sha hash of the normalized content (comments and whitespace lines stripped) of the file. .SS "begin_txn" .IX Subsection "begin_txn" Code to begin transaction, defaults to '\s-1BEGIN\s0;' .SS "commit_txn" .IX Subsection "commit_txn" Code to commit transaction, defaults to '\s-1COMMIT\s0;' .PP Useful if one needs to do two phase commit or similar .SH "METHODS" .IX Header "METHODS" .ie n .SS "content_wrapped($before, $after)" .el .SS "content_wrapped($before, \f(CW$after\fP)" .IX Subsection "content_wrapped($before, $after)" Returns content wrapped with before and after. .SS "is_applied($dbh)" .IX Subsection "is_applied($dbh)" returns 1 if has already been applied, false if not .SS "run($dbh)" .IX Subsection "run($dbh)" Runs against the current dbh without tracking. .SS "apply($dbh)" .IX Subsection "apply($dbh)" Applies the current file to the db in the current dbh. .SH "Functions (package-level)" .IX Header "Functions (package-level)" .SS "needs_init($dbh)" .IX Subsection "needs_init($dbh)" Checks to see whether the schema has been initialized .SS "init($dbh);" .IX Subsection "init($dbh);" Initializes the system. Modifications are maintained through the History module. Returns 0 if was up to date, 1 if was initialized. .SS "update($dbh)" .IX Subsection "update($dbh)" Updates the current schema to the most recent. .SH "AUTHOR" .IX Header "AUTHOR" Chris Travers, \f(CW\*(C`\*(C'\fR .SH "BUGS" .IX Header "BUGS" Please report any bugs or feature requests to \f(CW\*(C`bug\-pgobject\-util\-dbchange at rt.cpan.org\*(C'\fR, or through the web interface at . I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. .SH "SUPPORT" .IX Header "SUPPORT" You can find documentation for this module with the perldoc command. .PP .Vb 1 \& perldoc PGObject::Util::DBChange .Ve .PP You can also look for information at: .IP "\(bu" 4 \&\s-1RT: CPAN\s0's request tracker (report bugs here) .Sp .IP "\(bu" 4 AnnoCPAN: Annotated \s-1CPAN\s0 documentation .Sp .IP "\(bu" 4 \&\s-1CPAN\s0 Ratings .Sp .IP "\(bu" 4 Search \s-1CPAN\s0 .Sp .SH "ACKNOWLEDGEMENTS" .IX Header "ACKNOWLEDGEMENTS" Portions of this code were developed for LedgerSMB 1.5 and copied from appropriate sources there. .PP Many thanks to Sedex Global for their sponsorship of portions of the module. .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" Copyright 2016, 2017 Chris Travers. .PP This program is distributed under the (Revised) \s-1BSD\s0 License: .PP Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: .PP * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. .PP * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. .PP * Neither the name of LedgerSMB nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. .PP \&\s-1THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \&\*(L"AS IS\*(R" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\s0 (\s-1INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES\s0; \s-1LOSS OF USE, DATA, OR PROFITS\s0; \s-1OR BUSINESS INTERRUPTION\s0) \s-1HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\s0 (\s-1INCLUDING NEGLIGENCE OR OTHERWISE\s0) \s-1ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\s0