Upgrading from Version 0.8
From SubjectsPlus
Okay, this is a first draft & experimental to boot--use at your own risk, and ask the group if you have any questions. I'd try it out once on a copy of your data, and then again once you've determined it works. I wouldn't try to mix and match old and new files--start with the new files, and then add in your old customizations after.
Contents |
New Files
- Unzip the new SubjectsPlus into a folder on your server
Copy Data, Update SQL
- Make a copy of your live database. If you're doing this "for real" you need to freeze access to SubjectsPlus so that people don't add new content before you bring it up again.
- Create the new tables (thanks, Gavin!). Cut and paste the following into the SQL tab of phpMyAdmin (on your copied DB) and hit go: Migration SQL
If you were coming from version 0.7, you might also need to add the following:
ALTER TABLE `rank` ADD COLUMN `description_override` text;
ALTER TABLE `subject` ADD COLUMN `type` varchar(20) character set utf8 default NULL;
UPDATE subject SET type = 'Subject';
Config
- Set up your control/includes/config.php
Migration Script -- Generate Pluslets for all Pre-Existing Subject Guides
- Try the deadly migration script. It's located in control/guides/migrate.php. Follow the instructions at the top of the file, and then point your browser to it.
- NOTE some versions might have a wrong database connection string, try this dbCall($uname, $pword, "subsplus") if what's there doesn't work
- NOTE 2: You need write access to the folder that migrate.php runs in, because it tries to create a listing of all the uploaded files associated with each subject or user
- I changed the file permissions and it ran but with error.. "Addition of basic pluslet set failed."
- See if it worked--you should have a whole bunch of entries in your pluslets table.
- Try looking at one of your guides in the public interface, i.e., navigate to subjects/guide.php?subject=yoursub . Maybe it looks okay?!?
Create User Folders
- Ack, this stinks, but you need to make a new user folder for each of your users under assets/users/ based on the first part of that person's email address. I.e.,
assets/users/_bclinton
assets/users/_gwbush
etc.
- Get all your users pictures and plop each one in the appropriate folder. Rename to headshot.jpg.
- Migrate.php should also create a file external_files.txt. Use this to figure out which files need to be migrated from the old subjects/docs/ folder into the new assets/users/_username folder.
Re-Customize
- Add back in your customizations to the public interface--i.e., the subjects/header.php file, and elsewhere
- Any super-custom customizations (i.e., with the code or stuff in the admin) might need to be tweaked. Post your question to the list!
Remove unneeded tables
- Once you're successfully upgraded, you won't need some tables anymore:
- bestbets
- browse_journals
- callnum_subjects
- helpguide
- helpguide_subject
- textblob
