From FusionForge Wiki
Jump to: navigation, search


If you wish to migrate from GForge AS to FusionForge, there is a script located under contrib/migrate-from-gforge-as.pl which performs the task.


The following instruction is taken largely from the script itself:

  1. Backups!
  2. Rename the GForge AS database to "gfas"
  3. Create the initial FusionForge database as "gforge"
  4. Store a copy of the /var/lib/gforge/filesystem as /tmp/filesystem
  5. export DB_PW=foobar (the password of the databases)
  6. run migrate-from-gforge-as.pl
  7. In case something breaks:
    1. su - postgres -c 'dropdb gforge'
    2. /usr/share/gforge/bin/install-db.sh configure
    3. start again from step 3
  8. If no error appears, uncomment the last line of this script [migrate-from-gfoge-as.pl] and re-run it

Problems encountered

Your installation might be different, but here are the problems I encountered:

Users and Artifact Group List with matching primary keys

There is a clash between users defined in the gforge.sql installation file and on a default GForge AS system. I got around this problem by editing the gforge.sql file :

I commented out this line:

/*COPY artifact_group_list (group_artifact_id, group_id, name, description, is_public, allow_anon, email_all_updates, email_address, due_period, submit_instructions, browse_instructions, datatype, status_timeout, custom_status_field, custom_renderer) FROM stdin;
100	1	Default	Default Data - Dont Edit	3	0	0		2592000	\N	\N	0	\N	0	\N

and the None user, I changed the user_id to 99. Be careful though, as you will need to go through the file and change where this key is referenced.

Missing fields which are required

In the users table, there is a field theme_id, which is NULL by default. For login, there is the query:

'SELECT u.*,sl.language_id, sl.name, sl.filename, sl.classname, sl.language_code, t.dirname, t.fullname
                                 FROM users u, supported_languages sl, themes t
                                 WHERE u.language=sl.language_id 
                                   AND u.theme_id=t.theme_id
                                   AND u.user_id=$1',
				array ($user_id)) 

So users is never returned. I had to issue the following command in SQL:

UPDATE users SET theme_id=1 WHERE theme_id is NULL;