In order to move us one step closer to database independence we should move to using a db independent schema. DBIx::Class::Schema gives us this. If we use DBIx::Class::Schema::Versioned we can do away with both kohastructure.sql and updatedatabase.pl
http://git.koha-community.org/gitweb/?p=wip/koha-catalyst.git;a=shortlog;h=refs/heads/new/enh/bug_5837
What's the status on this? I'd love to see this in Koha proper.
DBIx::Class::DeploymentHandler would be another alternative to Versioned.
(In reply to comment #3) > DBIx::Class::DeploymentHandler would be another alternative to Versioned. Not without Moose it wouldn't. Versioned is a much more lightweight tool, and doesn't depend on installing every perl module in the entire world, which Moose seems to want to do. :) Short version this is stalled, I had a schema built, that I deployed to both postgres and mysql successfully. The code remains in a git branch, but then I crazily volunteered to be RM, and now RMaint .. and so haven't any time to devote to it. https://gitorious.org/koha/mainline/trees/dbix_class/lib/Koha/Schema I think working on this instead of poking at ` would be a much better use of someone's time :)
(In reply to Chris Cormack from comment #4) > (In reply to comment #3) > > DBIx::Class::DeploymentHandler would be another alternative to Versioned. > > Not without Moose it wouldn't. Versioned is a much more lightweight tool, > and doesn't depend on installing every perl module in the entire world, > which Moose seems to want to do. :) > > Short version this is stalled, I had a schema built, that I deployed to both > postgres and mysql successfully. The code remains in a git branch, but then > I crazily volunteered to be RM, and now RMaint .. and so haven't any time to > devote to it. > > https://gitorious.org/koha/mainline/trees/dbix_class/lib/Koha/Schema > > I think working on this instead of poking at ` would be a much better use of > someone's time :) I wouldn't say I'm working on this, but when I have free time here and there, I've been finding and solving the problems that stand in the way of using DBIx::Class for deploying and upgrading our DB schema. I have a few minor details to work on in terms of getting the schema to deploy the way we have it currently, but the biggest obstacle I'm facing is DBIx::Class::Schema::Loader. I think some changes might have to be done by hand to the DBIC Result classes themselves. I'm going to investigate that further though. In any case... I also think DBIx::Class::DeploymentHandler is probably too heavy, but I'm not 100% sure that DBIx::Class::Schema::Versioned will provide all we need either. Since it's just a module, we'll need an update script of some kind anyway. We'll also need a way of inserting data (for system preference, for example) and not just doing schema structure changes which DCSV is meant for. Anyway, yep, it's certainly on my mind... poking a lot at this on http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11390
Hi there! Can you share the code you have been working on here as commits? I am not asking for anything "git bz apply":able, just something to read your thoughts from.
(In reply to Olli-Antti Kivilahti from comment #6) > Hi there! > Can you share the code you have been working on here as commits? > I am not asking for anything "git bz apply":able, just something to read > your thoughts from. I don't have any code for this, but I'll post something to bug 11390 in a minute.
Closing this due to age and as it's unlikely it will ever happen