Difference between revisions of "Migrating/GforgeAS"
(tag: admin doc -> install)
|Line 55:||Line 55:|
Latest revision as of 12:41, 22 September 2015
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:
- Rename the GForge AS database to "gfas"
- Create the initial FusionForge database as "gforge"
- Store a copy of the /var/lib/gforge/filesystem as /tmp/filesystem
- export DB_PW=foobar (the password of the databases)
- run migrate-from-gforge-as.pl
- In case something breaks:
- su - postgres -c 'dropdb gforge'
- /usr/share/gforge/bin/install-db.sh configure
- start again from step 3
- If no error appears, uncomment the last line of this script [migrate-from-gfoge-as.pl] and re-run it
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;