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

Alexander Hartmaier alexander.hartmaier at t-systems.at
Fri May 21 08:36:47 GMT 2010


DDL queries executed by your model at runtime sounds like a VERY bad
idea!
Your app db user shouldn't even be allowed to execute those.

I'm using Oracle with partitioned tables (one per month for historical
data) as well and the database itself cares about creating the partition
for the next month in advance.

What for are you using the partitions?

--
Best regards, Alex


Am Mittwoch, den 12.05.2010, 10:07 +0200 schrieb Chris Cole:
> On Tue, 11 May 2010 21:52:47 +0100, Rob Kinyon <rob.kinyon at gmail.com>
> wrote:
>
> > On Tue, May 11, 2010 at 16:01, Chris Cole <chris at compbio.dundee.ac.uk>
> > wrote:
> >> Gives this error:
> >> Warning - transaction failed and rolling back:
> >> DBIx::Class::Schema::txn_do(): Can't locate object method "do" via
> >> package
> >> "DBIx::Class::Storage::DBI::Oracle::Generic" at
> >> /homes/ccole/projects/workspace/NGSdb/load_drs_data.pl line 176.
> >>
> >> Any ideas why $dbh-do() is failing?
> >
> > Maybe reading the documentation instead of relying purely on my advice
> > would be a good plan.
>
> If you'd put a caveat, maybe I would have looked harder. I did search for
> the docs, but couldn't find them.
>
> > http://search.cpan.org/~frew/DBIx-Class-0.08121/lib/DBIx/Class/Storage/DBI.pm#dbh_do
> >
> > $storage->dbh_do( sub {
> >     my ($storage, $dbh, @args) = @_;
> >     ....
> > }, @args );
>
> Thanks.
>
> _______________________________________________
> 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


*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*



More information about the DBIx-Class mailing list