in reply to dbicdump selected tables

Hi, to dump only one table, add the following option:

-o constraint=qr/table_name/
(See https://metacpan.org/pod/DBIx::Class::Schema::Loader::Base#constraint)

Hope this helps!


The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^2: dbicdump selected tables
by Ea (Chaplain) on Dec 12, 2018 at 17:17 UTC
    Yes, it works, although I swear that I had that an hour ago and it didn't <sigh>

    I finally passed through the argument that fixed the error {LongTruncOk => 1}, removed the extraneous quotes that I had introduced around the constraint and all of a sudden it works even better than I wanted it to an hour ago.

    have you ever wanted to strangle a bit of code?

    Thanks!

    Edit

    For completeness, here's the code fragment that works
    my @args = ('-o', 'dump_directory='. $root .'/lib/', '-o', q/components=["InflateColumn::DateTime"]/, '-o', 'constraint=qr/'. $table_prefix .'/', 'Timetable::Schema', "dbi:Oracle:$database", $username, $password, '{ LongTruncOk => 1 }', ); system( '/usr/local/bin/dbicdump', @args );
    which I'm re-writing to use DBIx::Class::Schema::Loader

    Ea

    Sometimes I can think of 6 impossible LDAP attributes before breakfast.

    YAPC::Europe::2018 — Hmmm, need to talk to work about sending me there or to Mojoconf.