Skip Menu |

This queue is for tickets about the Alzabo CPAN distribution.

Maintainer(s)' notes

Not really maintained any more. Interested in taking it over? Email the author.

Report information
The Basics
Id: 5251
Status: new
Priority: 0/
Queue: Alzabo

People
Owner: DROLSKY [...] cpan.org
Requestors: dhudes [...] hudes.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.82
Fixed in: 0.82



Subject: schema reverse engineering for Postgresql erroneously tries to create an index and fails
Perl 5.8.1 Postgresql 7.3.4-53 SuSE Linux 9.0 All applicable modules are up-to-date Problem: When Alzabo is asked to reverse-engineer an existing postresql schema it for some reason tries to create an index for the table but this index already exists. Error output: Index already exists (id models___model_id). Trace begun at /usr/lib/perl5/site_perl/5.8.1/Alzabo/Create/Table.pm line 375 Alzabo::Create::Table::add_index(undef, undef) called at /usr/lib/perl5/site_perl/5.8.1/Alzabo/Create/Table.pm line 363 Alzabo::Create::Table::make_index('Alzabo::Create::Table=HASH(0x870a9dc)', 'columns', 'ARRAY(0x86913a8)', 'unique', 1, 'function', undef) called at /usr/lib/perl5/site_perl/5.8.1/Alzabo/RDBMSRules/PostgreSQL.pm line 937 Alzabo::RDBMSRules::PostgreSQL::reverse_engineer('Alzabo::RDBMSRules::PostgreSQL=HASH(0x839ceac)', 'Alzabo::Create::Schema=HASH(0x816a93c)') called at /usr/lib/perl5/site_perl/5.8.1/Alzabo/Create/Schema.pm line 81 Alzabo::Create::Schema::reverse_engineer('Alzabo::Create::Schema', 'name', 'webcontent', 'rdbms', 'PostgreSQL', 'user', 'dhudes', 'password', 'xxxxxxx', 'host', 'localhost') called at Webcontent.pm line 122 This happens with other schema. One note is that both schema tried have n:n relationships via intermediate tables and foreign keys. Perl code used to invoke Alzabo (note that I have elided my password): use Alzabo::Create::Schema; my $name = "webcontent"; my $rdbms = "PostgreSQL"; my $user = "dhudes"; my $password="xxxxx"; my $host = "localhost"; my $schema = Alzabo::Create::Schema->reverse_engineer( name => $name, rdbms => $rdbms, user => $user, password =$password, host => $host); $schema->save_to_file();
[guest - Sat Feb 7 22:49:48 2004]: Show quoted text
> Perl 5.8.1 > Postgresql 7.3.4-53 > SuSE Linux 9.0 > All applicable modules are up-to-date > > Problem: > When Alzabo is asked to reverse-engineer an existing postresql schema > it for some reason tries to create an index for the table but this > index already exists. > Error output: > > Index already exists (id models___model_id). > > Trace begun at /usr/lib/perl5/site_perl/5.8.1/Alzabo/Create/Table.pm > line 375 > Alzabo::Create::Table::add_index(undef, undef) called at > /usr/lib/perl5/site_perl/5.8.1/Alzabo/Create/Table.pm line 363 > Alzabo::Create::Table::make_index('Alzabo::Create::Table=HASH(0x870a9dc)', > 'columns', 'ARRAY(0x86913a8)', 'unique', 1, 'function', undef) > called at > /usr/lib/perl5/site_perl/5.8.1/Alzabo/RDBMSRules/PostgreSQL.pm line > 937 >
Alzabo::RDBMSRules::PostgreSQL::reverse_engineer('Alzabo::RDBMSRules::PostgreSQL=HASH(0x839ceac)', Show quoted text
> 'Alzabo::Create::Schema=HASH(0x816a93c)') called at > /usr/lib/perl5/site_perl/5.8.1/Alzabo/Create/Schema.pm line 81 > Alzabo::Create::Schema::reverse_engineer('Alzabo::Create::Schema', > 'name', 'webcontent', 'rdbms', 'PostgreSQL', 'user', 'dhudes', > 'password', 'xxxxxxx', 'host', 'localhost') called at Webcontent.pm > line 122 > > This happens with other schema. One note is that both schema tried > have n:n relationships via intermediate tables and foreign keys. > > Perl code used to invoke Alzabo (note that I have elided my password): > > use Alzabo::Create::Schema; > my $name = "webcontent"; > my $rdbms = "PostgreSQL"; > my $user = "dhudes"; > my $password="xxxxx"; > my $host = "localhost"; > my $schema = Alzabo::Create::Schema->reverse_engineer( > name => $name, > rdbms => $rdbms, > user => $user, > password =$password, > host => $host); > $schema->save_to_file(); >
I've seen this happen when there are two types of index (say, b-tree & hash) on the same column. No workaround at the present. Alzabo really needs to know about index types to fix this. But it could be a different bug, so can you check to see if this happens with 0.83?
happens with mysql & latest alzabo also. Show quoted text
> Perl 5.8.1 > Postgresql 7.3.4-53 > SuSE Linux 9.0 > All applicable modules are up-to-date > > Problem: > When Alzabo is asked to reverse-engineer an existing postresql schema > it for some reason tries to create an index for the table but this > index already exists. > Error output: > > Index already exists (id models___model_id).
i worked around this problem by deleting the duplicate indexes in the form of (indexname)_(number), then reloading the script. i had to do this twice. ps, i'm using the mason interface and not direct script. Show quoted text
> happens with mysql & latest alzabo also. > >
> > Perl 5.8.1 > > Postgresql 7.3.4-53 > > SuSE Linux 9.0 > > All applicable modules are up-to-date > > > > Problem: > > When Alzabo is asked to reverse-engineer an existing postresql
> schema
> > it for some reason tries to create an index for the table but
> this
> > index already exists. > > Error output: > > > > Index already exists (id models___model_id).
Date: Fri, 13 Aug 2004 08:12:56 -0500 (CDT)
From: Dave Rolsky <autarch [...] urth.org>
To: Guest via RT <bug-Alzabo [...] rt.cpan.org>
Subject: Re: [cpan #5251] schema reverse engineering for Postgresql erroneously tries to create an index and fails
RT-Send-Cc:
On Fri, 13 Aug 2004, Guest via RT wrote: Show quoted text
> happens with mysql & latest alzabo also.
Can you give me the SQL to create a schema so I can reproduce the bug? -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/
From: Alex McLintock
I seem to have a very similar bug in the most recent Alzabo/Mason GUI. When trying to reverse engineer the default Bricolage database on postgreSQL I get a very similar error. RedHat Linux Fedora Core 4 Azabo 0.87 Perl 5.8.7 Apache 1.3x mod_perl 1.29 Alex dot McLintock at gmail dot com Index already exists (id alert_type_rule___lower___id___alert_type__id___attr___operator___value). Error class: Alzabo::Exception::Params Trace: Trace begun at /usr/local/lib/perl5/site_perl/5.8.7/Alzabo/Create/Table.pm line 375 Alzabo::Create::Table::add_index(undef, undef) called at /usr/local/lib/perl5/site_perl/5.8.7/Alzabo/Create/Table.pm line 363 Alzabo::Create::Table::make_index('Alzabo::Create::Table=HASH(0xaade4f4)', 'columns', 'ARRAY(0xaa241f8)', 'unique', 0, 'function', 'lower(attr::text)') called at /usr/local/lib/perl5/site_perl/5.8.7/Alzabo/RDBMSRules/PostgreSQL.pm line 951 Alzabo::RDBMSRules::PostgreSQL::reverse_engineer('Alzabo::RDBMSRules::PostgreSQL=HASH(0xaa8b084)', 'Alzabo::Create::Schema=HASH(0xaa8ac40)') called at /usr/local/lib/perl5/site_perl/5.8.7/Alzabo/Create/Schema.pm line 85 Alzabo::Create::Schema::reverse_engineer('Alzabo::Create::Schema', 'name', 'bric', 'rdbms', 'PostgreSQL', 'user', 'bric', 'password', 'bric', 'host', 'localhost', 'port', '') called at /usr/local/bricolage/comp/mason/alzabo/schema/reverse_engineer.mas line 15 eval {...} at /usr/local/bricolage/comp/mason/alzabo/schema/reverse_engineer.mas line 14 HTML::Mason::Commands::__ANON__('password', 'bric', 'name', 'bric', 'rdbms', 'PostgreSQL', 'port', '', 'host', 'localhost', 'username', 'bric') called at /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Component.pm line 135 HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xa871b04)', 'password', 'bric', 'name', 'bric', 'rdbms', 'PostgreSQL', 'port', '', 'host', 'localhost', 'username', 'bric') called at /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Request.pm line 1255 eval {...} at /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Request.pm line 1249 HTML::Mason::Request::comp(undef, undef, 'password', 'bric', 'name', 'bric', 'rdbms', 'PostgreSQL', 'port', '', 'host', 'localhost', 'username', 'bric') called at /usr/local/bricolage/comp/mason/alzabo/schema/autohandler line 148 HTML::Mason::Commands::__ANON__('password', 'bric', 'name', 'bric', 'port', '', 'rdbms', 'PostgreSQL', 'username', 'bric', 'host', 'localhost') called at /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Component.pm line 135 HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xa768ef0)', 'password', 'bric', 'name', 'bric', 'port', '', 'rdbms', 'PostgreSQL', 'username', 'bric', 'host', 'localhost') called at /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Request.pm line 1255 eval {...} at /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Request.pm line 1249 HTML::Mason::Request::comp(undef, undef, 'password', 'bric', 'name', 'bric', 'port', '', 'rdbms', 'PostgreSQL', 'username', 'bric', 'host', 'localhost') called at /usr/local/bricolage/comp/mason/alzabo/schema/syshandler line 1 HTML::Mason::Commands::__ANON__('password', 'bric', 'name', 'bric', 'rdbms', 'PostgreSQL', 'port', '', 'host', 'localhost', 'username', 'bric') called at /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Component.pm line 135 HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xa8089a0)', 'password', 'bric', 'name', 'bric', 'rdbms', 'PostgreSQL', 'port', '', 'host', 'localhost', 'username', 'bric') called at /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Request.pm line 1250 eval {...} at /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Request.pm line 1249 HTML::Mason::Request::comp(undef, undef, undef, 'password', 'bric', 'name', 'bric', 'rdbms', 'PostgreSQL', 'port', '', 'host', 'localhost', 'username', 'bric') called at /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Request.pm line 461 eval {...} at /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Request.pm line 461 eval {...} at /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/Request.pm line 413 HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0xaa8ae08)') called at /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/ApacheHandler.pm line 167 HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0xaa8ae08)') called at /usr/local/lib/perl5/site_perl/5.8.7/HTML/Mason/ApacheHandler.pm line 817 HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0xa721e60)', 'Apache=SCALAR(0xaab3818)') called at (eval 258) line 8 HTML::Mason::ApacheHandler::handler('HTML::Mason::ApacheHandler', 'Apache=SCALAR(0xaab3818)') called at /dev/null line 0 eval {...} at /dev/null line 0