Database conversion tool

Maximilian Kossick maximilian.kossick at googlemail.com
Wed Apr 2 12:26:36 CEST 2008


On Wed, Apr 2, 2008 at 12:12 PM, Seb Ruiz <ruiz at kde.org> wrote:
>
> On 29/03/2008, Maximilian Kossick <mkossick at gmx.de> wrote:
>  > On Saturday 29 March 2008, Maximilian Kossick wrote:
>  >  > On Saturday 29 March 2008, Seb Ruiz wrote:
>  >  > > Hi All,
>  >  > > I'd like to get back in A2 development by writing a tool that will let
>  >  > > users convert their Amarok 1.4 database into one which is readable by
>  >  > > Amarok 2.
>  >  > >
>  >  > > This means extracting from sqlite/mysql/pgsql and inserting it into
>  >  > > the sqlite (or other, if we decide) of Amarok 2.
>  >  > >
>  >  > > Is there any documentation on the schema of the A2 database, aside
>  >  > > from viewing the database or source code directly?
>  >  >
>  >  > Unfortunately not as far as I know. I think somebody generated a diagram of
>  >  > either the A1 or A2 database once, and sent it to one of our lists. That's
>  >  > not proper documentation, but at least you would not have to figure out the
>  >  > schema by reading the source code.
>  >  >
>  >  > > Also, any suggestions on the best way to create this tool? Integrate
>  >  > > it into Amarok 2, or as a standalone app?
>  >  > >
>  >  > > Cheers,
>  >  > > Seb
>  >
>  >
>  > How about simply copying the statistics table from A1 into the A2 database?
>  >  That table did not change all that much. A2 could fill the other tables by
>  >  simply scanning the collection. It might be a good idea to run some sanity
>  >  checks on the rows of A1's statistics table. There's probably some stuff in
>  >  there which does not belong in the A2 SqlCollection statistics table, because
>  >  that one only handles statistics for files in the local collection.
>
>  What's the deal with dynamic collections in A2? I noticed that the
>  'urls' table has a deviceid column. Is this actively in use or just
>  for future expansion into dynamic collections?
>
For future expansion. I don't think anybody will implement/port the
necessary code for 2.0, so just assume that the deviceid will always
be -1. We might have to change the script if we implement it later and
somebody wants to vonert a A1 database into a post-2.0 database, but
we can worry about that then.

Max


More information about the Amarok-devel mailing list