BETYdb 4.1 New Database Uniqueness Constraints
New uniqueness constraints for database tables and validations for corresponding models; new RSpec tests; several bug fixes.
This release implements several value and uniqueness constraints on database tables aimed at ensuring that the BETYdb database will not contain multiple rows describing the same citation, site, species, treatment, or other entity. In conjunction with the database changes, new model validations have been added to several of the models so that potentially invalid database insertions or updates are caught at the Rails level before the insertion or update is attempted on the database.
Second, several bugs existed that prevented access to many pages of the site--especially pages for editing database entities. Many of these were introduced by changes to the routing file that eliminated most wildcard routes. These bugs have now been fixed and several new tests have been added to ensure these bugs don't re-appear.
Changes Pertinent to PEcAn Users
Administrators need to do a database migration.
See "Database Changes" below.
Summary of Changes
New Features
New Validations to Prevent Duplicate Rows and Missing Data
Bug Fixes
- Many pages that were previously inaccessible are once again reachable. Prior to this update, attempting to visit these pages yielded the following error:
The page you were looking for doesn't exist.
You may have mistyped the address or the page may have moved.
Affected pages included (for example)
- the Covariate editing page
- the Model editing page
- the Modeltype editing page
- the Species editing page
- the Traits editing page
Steps Needed for Upgrade
Database Changes
Administrators need to do database migrations!
One migration has been added that new value and uniqueness constraints and also adds some convenience functions for implementing these constraints.
The database version for this release is 20150202220519.
Status of RSpec Tests
-
All tests continue to pass when run in the default environment and can be run using the command
bundle exec rspec
Every effort has been made to make this command idempotent: You should be able to run the tests multiple times without reloading the test fixtures between runs.
Complete details for running the rspec tests are on the updated Wiki page at https://github.com/PecanProject/bety/wiki/Automated-Tests