To preserve the old applications, you must follow these steps:
  1. Back up the database:
    su - mysql
    cd ~www/mysqlarchive
    mkdir -p applications/`date +%Y`
    cd !$
    /usr/local/mysql/bin/mysqldump -u root reu_4 > reu4_4.db
    /usr/local/mysql/bin/mysqldump -u root securit_4 > securit_4.db
    /usr/local/mysql/bin/mysqldump -u root star_4 > star_4.db
    /usr/local/mysql/bin/mysqldump -u root wise_4 > wise_4.db
    
    Check the contents of the files.
  2. Go to mysql for the site
  3. For each database (reu_4, securit_4, star_4 and wise_4), perform the following operations. We are doing two things: 1) Moving the previous database from apply to applyyear where year is either this year or next year and 2) copying just the structure (not the data and structure) from the newly created database (applyyear) back to apply.
    1. Find the apply table.
    2. Select the Operations tab
    3. In Move table to area, rename the database to applyyear, for example, apply2015
    4. Then copy just the structure back to a new, empty table with just structure called apply
  4. Then, on the website, disable and reenable the application for each workgroup by doing to Admin -> Configure Group, unchecking "Application Form", clicking "Change Group Configuration" and then checking "Application Form" and clicking "Change Group Configuration".
    Email will then be sent to the administrator

The following php updates must occur:

  1. As root or the www user on moog, edit ~www/php/include/apply.inc.php and update the year in
    Standing as of February 1, 201X
    
  2. As root or the www user on moog, edit ~www/php/apply/apply.php and add a menu item for the previous year.
    Look for:
        // Each year, add a clause for the previous year.
        if (($selector != "all" || $table != "apply2014") && sqli_exists($db, "apply2014")) {
            $marginCommands .= "<li><a href="/$group/$originalSubpage/all/2014">All 2013 ${recordShort}s</a></li>n";
        }
    
    Copy the if clause and replace the year in the copy with the current year.
        // Each year, add a clause for the previous year.
        if (($selector != "all" || $table != "apply2015") && sqli_exists($db, "apply2015")) {
            $marginCommands .= "<li><a href="/$group/$originalSubpage/all/2015">All 2015 ${recordShort}s</a></li>n";
        }                                                       
        if (($selector != "all" || $table != "apply2014") && sqli_exists($db, "apply2014")) {
            $marginCommands .= "<li><a href="/$group/$originalSubpage/all/2014">All 2013 ${recordShort}s</a></li>n";
        }
    

    This is necessary so that Aimee can look at the old applications.