# Upgrade from 4.4 to 5.0
For users with an existing NADA 4.x catalog an upgrade script is included that will update your NADA 4.x database to NADA 5. The process will modify your current NADA database. Please make sure you are running on PHP 7, see section
installation guide for NADA 5 requirements.
Backup your NADA database before doing anything!!
Make a backup of your NADA database.
Download and unzip NADA 5 files to a new folder on your web server.
Copy application/config/database.php file from your existing NADA and place it in the new NADA folder application/config.
Open the database.php and make sure the database debug mode is set to false:
$db['default']['db_debug'] = FALSE;
- Change the database drivers to mysqli:
$db['default']['dbdriver'] = "mysqli";
- Edit the configuration file application/config/config.php and enable
maintenance modeby adding or enabling this line of code:
The line can be added anywhere in the
This step makes changes to your NADA database that are not undo-able so make sure you do make a database backup before this step.
Navigate to the URL for the NADA5 website: Example: http://your-nada5-site/index.php/nada5_upgrade/run (opens new window)
The upgrade will update database tables and indexes. For any failed updates, it will show the SQL queries and the error messages. You will need to run the failed queries on your database directly to finish the upgrade.
To verify the database upgrade. Open the NADA catalog page by going to http://[your-nada5-site]/index.php/catalog page and verify all studies from NADA 4 are listed.
application/config/config.phpfile and disable
# Linking data files
The upgrade script has only upgraded the database. It is now necessary to tell the NADA where to locate the data files that were uploaded to the original NADA website.
There are two options available:
Option 1: Copy the datafiles folder from your old NADA to the new NADA. This works best if you have only a few studies and the datafiles folder size is small enough to be moved easily from one location to another.
Option 2: If it is not possible to easily move the datafiles folder from your old NADA, you can tell NADA the location of the datafiles without moving the files. Here are the steps:
Use your old NADA administrator login credentials to login to your new NADA 5 site.
Click on Site administration in the top right corner of the screen.
Go to the “Settings” menu and click on the “Settings” sub-menu.
Under Site configurations, expand the “Survey Catalog Settings” section
For the setting “Catalog folder”, enter the relative or full path to where the NADA
datafilesfolder is located. For example, if the nada4 datafiles are located on
c:/nada4/datafiles, enter that path here.
Save the configurations by clicking on the update button. If now errors are shown then you have successfully updated the folder path.
Check your new NADA site to make sure the migration was successful
Data Catalogpage and view the studies by clicking on the study title to make sure the study information pages are correct.
Check the site menus are the same as your old NADA site.
# Update study metadata
To update the metadata stored in the database for studies, metadata needs to be reloaded from the DDI files. The refresh DDI feature in NADA updates the database with metadata from the DDI without having re-uploading the DDIs. To update the metadata for all studies in your catalog:
Open the following NADA URL in your browser:
Select all studies
Click on the “Refresh DDI” button
# Updating the Site theme/template
In NADA 5, website templates have been rewritten using Bootstrap 4. You will not be abl to use your old NADA templates. Here are the general guidelines on creating or customizing the template.
Themes are stored in the
themesfolder. The default template is named
Duplicate the folder
The layout.php file is the main file that controls the template. If you just want to change the site header with your own logo and/or text, edit the file
To use your custom theme, edit the
[nada4-root]/config/template.phpfollowing the steps below:
Look for the setting
theme_name, by default it is set to
nadato the theme name you want to use. Theme name is the folder name you created for your custom theme.
Save the file.
See the Bootstrap 4 website for usage and styling - https://getbootstrap.com/ (opens new window)