2 -- If the theme with theme_id=1 exits it is copied at the end of the list
4 INSERT INTO themes (dirname, fullname) SELECT dirname,fullname FROM themes where theme_id=1;
5 DELETE FROM themes WHERE theme_id=1;
6 INSERT INTO themes (theme_id,dirname, fullname) VALUES (1,'gforge', 'Default Theme');
8 ALTER TABLE theme_prefs
9 ADD CONSTRAINT themeprefs_userid FOREIGN KEY (user_id)
10 REFERENCES users(user_id);
12 ALTER TABLE theme_prefs
13 ADD CONSTRAINT themeprefs_themeid FOREIGN KEY (user_theme)
14 REFERENCES themes(theme_id);