Skip to content

BETYdb 4.2.1 Critical update to fix SQL constraints

Compare
Choose a tag to compare
@gsrohde gsrohde released this 25 Jun 20:13
· 962 commits to master since this release

DOI

This is a critical update to correct SQL functions; it also includes miscellaneous other changes.

The primary motivation for this release is to correct id-getting SQL functions that are being used to implement a distributed foreign-key constraint on the dbfiles table. Without this fix, non-EBI users will be unable to import data. A database migration corrects the problem functions.

Two other migrations are included: The first adds columns to the machines table having to do with data synchronization. The second implements default values on timestamp columns which historically have often been left as NULL.

Also included is a major feature addtion: the ability to generate and update database schema documentation using a rake task that runs SchemaSpy.

Changes Pertinent to PEcAn Users

Administrators need to do a database migration.

See "Database Changes" below.

Summary of Changes

New Features

Rake task to generate database schema documentation

Database schema documentation is viewable from the Rails app by selecting "Schema" in the "Docs" menu. But up until now, this documentation has not been kept up to date. Now, up-to-date documentation can be generated using the "rake bety:dbdocs" task.

Bug Fixes

  • The above-mentioned migration fixes a problem with SQL functions that would prevent users from importing data to their own copies of the BETYdb database (GH issue #327).
  • A long-standing error in the way the traits list page was displayed for users with "Viewer" status has been fixed (GH issue #299).

Steps Needed for Upgrade

Database Changes

Administrators need to do database migrations!

There are three migrations in this release (see descriptions above).

The database version for this release is 20150625184958.

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
    

Complete details for running the rspec tests are on the updated Wiki page at https://github.com/PecanProject/bety/wiki/Automated-Tests