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

Chris Cole chris at compbio.dundee.ac.uk
Fri May 21 09:33:18 GMT 2010


Hi ALex,

On 21/05/10 09:36, Alexander Hartmaier wrote:
> 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.

Why?

> 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?

The table itself holds information of matches to genomic DNA from 
sequencing experiments. We do this for several different organisms and 
experiments and the table will get pretty large (currently 92M rows). 
The partitions are used to separate data mappings into different 
experiments.

Would this be better done via a trigger?
Cheers,

Chris

> --
> 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.
> *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
>
> _______________________________________________
> 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


-- 
Dr Chris Cole
Senior Bioinformatics Research Officer
School of Life Sciences Research
University of Dundee
Dow Street
Dundee
DD1 5EH
Scotland, UK

url: http://network.nature.com/profile/drchriscole
e-mail: chris at compbio.dundee.ac.uk
Tel: +44 (0)1382 388 721

The University of Dundee is a registered Scottish charity, No: SC015096



More information about the DBIx-Class mailing list