On Wed, 15 Sep 2010 19:20:55 -0700
Cecilia Albertsson <[email protected]> wrote:

> Hi again,
> 
> I am investigating the failed migration of suggestions from 2.0.3 to
> 2.1.1, and I think it would be useful to know the details of the
> format Pootle uses for its mysql data. Is there any documentation
> describing which variables are used for what etc? In particular it
> would be useful to know the details of the mysql table format for
> suggestions.

I just uploaded an ER diagram that exlains Pootle's datamodel and
database structure
http://translate.sourceforge.net/wiki/developers/pootle/models

suggestions would be in a table called pootle_store_suggestions 
 
> And btw, if anyone has any ideas on how to migrate suggestions from
> 2.0.3 (pending files) to 2.1.1 (mysql), I would be very grateful for
> some advice.

attached a script that repeats suggestion migration from pending files
to database. if you are running from checkout place it in the Pootle
directory then run it

python ./migrate_pending.py

note that migrated suggestions get deleted from the pending file. so
you might want to take a backup first.

cheers,
Alaa
import syspath_override
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'pootle.settings'

from django.conf import settings

from pootle_app.models import Directory
from pootle_store.models import Store

def main():
    for store in Store.objects.iterator():
        print u"migrating suggestions for %s" % store
        store.import_pending()
        print u"found %d suggestions" % store.has_suggestions()

if __name__ == "__main__":
    main()

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Translate-pootle mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to