Subject: | notes && errors in Queue::DBI::Admin |
Date: | Sun, 16 Sep 2012 21:43:14 +0400 |
To: | <bug-queue-dbi [...] rt.cpan.org> |
From: | Сергей Бондаренко <bond-spb [...] mail.ru> |
1. DB constraints/indexes naming convention
I suggest next scheme:
idx_<table_name>_<field_name> for indexes
unq_<table_name>_<field_name> for unique indexes
fk_<table_name>_<field_name> for foreign constraints
see:
line 181
line 228
line 229
2. Error in fk constraint definition (line 229)
2.1 non unique fk constraint name error when creating more when one queue table pairs (using suggested naming convention will solve this)
2.2 ...REFERENCES `queues`... - replace with real table name from 'queues_table_name'
3. create_tables 'sqlite' parameter (line 131)
Are you really need this param?
Using $dbh->{Driver}->{Name} or better $dbh->get_info() you can get current db name and croak something like "Only sqlite and mysql supported for now".
And you can simply extend module for pgsql, mssql, etc in future
4. Don't forget to list supported databases in POD please.
BR
Sergey