On 01/24/2017 11:40 PM, Matt S Trout wrote: > On Fri, Jan 06, 2017 at 03:17:58PM +0100, Stefan Hornburg (Racke) wrote: >> I created a module to support scripting: >> >> https://metacpan.org/pod/DBIx::Class::DeploymentHandler::CLI > > I'd love to see any missing features added to the App::DH that I wrote > a few years back unless there's a compelling reason to have two. >
OK, I'll check that out ... >> I also coded a helper for custom scripts, which are also a fantastic >> part of DeploymentHandler, but you can't easily test them right >> now. This will be part of a subsequent release. > > Do please discuss your ideas for that on here - maybe they can be rolled > into DeploymentHandler so they're available to all users thereof? > Currently I'm working on a larger and complicated migration, so I'm going through a lot of iterations. Changing schema and/or custom script, prepare the DH files and run the upgrade. So basically I run the following script after resetting the database: git clean -df sql ./bin/dh-prepare-upgrade ./bin/install-custom --before-sql InvalidValues ./bin/install-custom --before-sql FixDanglingRecords ./bin/install-custom MergeAccounts ./bin/dh-upgrade InvalidValues, FixDanglingRecords and MergeAccounts are Perl modules in the Foo::Schema::Upgrades namespace. I can also run an individual script with ./bin/run-custom MergeAccounts The next step is to put these scripts and support for them in the ::CLI module and after that we can check whether we can roll that into DeploymentHandler. How does that sound? Regards Racke -- Ecommerce and Linux consulting + Perl and web application programming. Debian and Sympa administration. _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk