MySQL::Diff(3pm)
π MySQL::Diff π
okay so bestie, welcome to MySQL::Diff β she generates a database upgrade instruction set. that's the whole vibe. no cap.
β¨ SYNOPSIS β¨
use MySQL::Diff;
my $md = MySQL::Diff->new( %options );
my $db1 = $md->register_db($ARGV[0], 1);
my $db2 = $md->register_db($ARGV[1], 2);
my $diffs = $md->diff();
πΈ DESCRIPTION πΈ
Generates the SQL instructions required to upgrade the first database to match the second.
that's it, that's the whole job. db1 walks in looking a mess, db2 is the glow-up goal, and this module writes you the to-do list. π
π METHODS π
π Constructor
new( %options )β instantiate the objects, providing the command line options for database access and process requirements. like, she needs to know how to talk to your databases before she does anything. feed her the options. π«Ά
π¦ Public Methods
fuller documentation will appear here in time :) β yes bestie, that's genuinely what the original says. iconic honesty. π
register_db($name,$inx)β reference the database, and setup a connection. so like, this is the "hey girl, meet your database" moment.- the
$namecan be an already existing'MySQL::Diff::Database'database object. so you can hand her a whole pre-built one, she's not picky. π - the
$inxcan be'1'or'2', and it refers both to the order of the diff, and to the host, port, username and password arguments that have been supplied. so like, index 1 = the "before" girlie, index 2 = the "after" girlie, and each index pulls its own connection credentials. periodt.
- the
db1()db2()β return the first and second databases registered via"register_db()". literally just handing them back to you. β¨diff()β performs the diff, returning a string containing the commands needed to change the schema of the first database into that of the second. this is the main character method. she does the work and hands you a string full of SQL. π
π COPYRIGHT AND LICENSE π
Copyright (c) 2000-2016 Adam Spiers. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
ngl the "same terms as Perl itself" clause is doing a lot of heavy lifting there but okay, slay, we love a permissive license. π
π₯ SEE ALSO π₯
mysqldiffMySQL::Diff::DatabaseMySQL::Diff::TableMySQL::Diff::Utils
go read those too, bestie, iykyk. π
π« AUTHOR π«
Adam Spiers <mysqldiff@adamspiers.org>
perl v5.26.2 Β· 2018-07-20 Β· MySQL::Diff(3pm)
and that's the page, bestie π β written up by the perl docs girlies back on 2018-07-20, running on perl v5.26.2, and filed under MySQL::Diff(3pm). mwah. πβ¨
π¦ where this page comes from
- debian bookworm: libmysql-diff-perl 0.60-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmysql-diff-perl 0.60-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libmysql-diff-perl 0.60-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmysql-diff-perl 0.60-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms