Upgrade from NADA 4.4 to NADA 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.
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;
- Edit the configuration file application/config/config.php and enable maintenance mode by adding or enabling this line of code:
The line can be added anywhere in the config.php file.
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
- 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.
8. 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.
- Edit application/config/config.php file and disable maintenace mode by setting the value for $config[“maintenance_mode”] to 0.
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 themes folder. The default template is named nada.
- Duplicate the folder themes/nada 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 ‘header.php’.
- To use your custom theme, edit the [nada4-root]/config/template.php following the steps below:
- Look for the setting theme_name, by default it is set to nada:
- Change nada to 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/