[Koha-bugs] [Bug 12558] DBIx::Class schema update 07/2014

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Nov 28 00:42:09 CET 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12558

David Cook <dcook at prosentient.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dcook at prosentient.com.au

--- Comment #12 from David Cook <dcook at prosentient.com.au> ---
I'm noticing a fair number of issues with the use of
DBIx::Class::Schema::Loader over at
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11390.

A summary of the most recent issues I've found:

1) "ON UPDATE CURRENT_TIMESTAMP" doesn't make it in to the DBIC classes.
2) "All int(egers) are recorded as int(11), all tinyint as tinyint(4), all
smallint as smallint(6).
3) Many indexes are missing (which causes `items_search_fields` and
`message_queue` not to create during a deploy because of foreign_key and
auto_increment problems respectively)
4) Extra indexes appear (as all foreign keys are indexed by default, which
isn't something we've done consistently in kohastructure.sql, although it's a
good idea)
5) Index names and foreign key constraint names are different between DBIC and
kohastructure.sql
6) DBIC doesn't include COMMENTs (honestly, I don't think this matters at all)
7) (UTF8) CHARACTER SET and COLLATE do not appear in the SQL deployed by DBIC
--
8) We've added extra foreign keys to the DBIC classes but not to
kohastructure.sql... 
9) We've added the `closure` and `closure_rrule` tables to DBIC but not to
kohastructure.sql
--
10) `pending_offline_operations` is loaded as an InnoDB table but is actually a
MyISAM table...
11) The 'double' data type is recorded as 'double precision' which causes
massive problems when using SQL::Translator::Diff (which is used by
DBIx::Class::Schema::create_ddl_dir() to make SQL diffs between schema
versions)

-----

I see DBIx::Class::Schema::Loader being responsible for:

1) "ON UPDATE CURRENT_TIMESTAMP" doesn't make it in to the DBIC classes (I
think this can be defined as an "extra" in the Result classes themselves...
requires more investigation)
2) "All int(egers) are recorded as int(11), all tinyint as tinyint(4), all
smallint as smallint(6). 
-> Actually, the "int" data types have the number stripped off by
DBIC::Schema::Loader. The problem with the number width/range happens during
DBIC::Schema->deploy()
-> The numbering happens thanks to SQL::Translator::Producer::MySQL I
think...requires more investigation... I think this might be solved by adding
"size" to the DBIC Result classes manually... or possibly via the Loader...
3) Missing indexes (requires investigation)
5) Index names and foreign key constraint names are different... (currently
investigating this one)
6) DBIC doesn't include COMMENTs (I don't know how it would or if it could. But
again, I don't think this matters.)
7) (UTF8) CHARACTER SET and COLLATE do not appear in the SQL deployed by DBIC
(I don't really know anything about character sets or collation, so... hoping
someone can help out on this one)
10) `pending_offline_operations` is loaded as an InnoDB table but is actually a
MyISAM table... (I think there might be filtering available for this...
investigating this too)
11) The 'double' data type is recorded as 'double precision' which causes
massive problems when using SQL::Translator::Diff (which is used by
DBIx::Class::Schema::create_ddl_dir() to make SQL diffs between schema
versions)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list