Once [#4637] is done, we will need a paster command to migrate the data from the existing MySQL tables. An example dump of the table is attached.
Since each project has its own database, the database name as well as destination project will need to be passed on the command-line, but the rest of the connection information will need to come from the config files (production.ini
, with a key like sfx.hostedapps_db.hostname
).
Fields should be matched up as follows:
url
= url
short_name
= short_id
description
= description
private
= private
create_user
= create_user
created
= create_time
last_updated
= edit_time
Other fields from the SQL table should be dropped.
The create_user
field should match the sfx_userid
field on the allura.model.User
model and should be translated to the correct ID for the Allura app (presumably the _id
field).
The url
and description
field should handle unicode values properly.
Diff:
Diff:
Related
Tickets:
#4637Diff:
Related
Tickets:
#4637Created #163: [#4785] URL shortener app migration paster command (2cp)
Related
Tickets:
#4785Closed #163. Branch 42cc_4785.
Usage example:
$ paster migrate-urls ../Allura/development.ini urls 504867768fd0920bb8c21ffd
Available options:
We should update this code to use the same "hostedapps" ini settings set up in https://trac.geek.net/trac/siteops/ticket/52623 for the mediawiki importer
unique_indexes = ['short_name']
might be a problem.I think it should be unique per project.