[Dbix-class] How to alter table via DBIC?

Rob Kinyon rob.kinyon at gmail.com
Tue May 11 13:02:38 GMT 2010


On Tue, May 11, 2010 at 08:52, Chris Cole <chris at compbio.dundee.ac.uk> wrote:
> Hi,
>
> I have a partitioned Oracle table that I want add data to, but it needs to
> be done on named partitions. Before I can insert the data I need to create a
> new partition. Manually, this is done via an ALTER TABLE statement, but I
> can't see anywhere on how to do this from within DBIC. Is this possible, at
> all?

I hope someone will give you a better answer than this, but you should
know about one of the "escape hatches".

$schema->storage->dbh_do( sub {
    my $dbh = shift;

    # At this point, you have the raw DBI $dbh that you would get from
DBI->connect
    # So, you can literally do whatever you want here.
});

HTH
Rob



More information about the DBIx-Class mailing list