datajoint/datajoint-matlab

Schema name must start with lower case

Opened this issue · 2 comments

Bug Report

Description

A schema name that starts with an upper case character (MySchema) will be created fine and works for the most part, but

  1. an edr cannot be generated (the regexp in edr.m searching for data tiers enforces lower case)
  2. creates confusing errors for joins, because the search for foreignkeys in dj.Table returns duplicate entries and ultimately generates spurious error messages about duplicate fields that need to be projected out. These errors disappear after clear classes, but reappear on the second run of the same query;

Reproducibility

Include:

  • OS : WIN
  • MATLAB #260
  • MySQL Version : 5/7
  • MySQL Deployment Strategy (local-native | local-docker | remote) - local docker
  • DataJoint Version: 3.5.0

Expected Behavior

Probably the easiest fix is to enforce a lower-case letter at the start of a schema name when the schema is first created.

@bartkrekelberg Good catch! Yes, this seems like a bug. It used to be that MySQL treated schema names as case-insensitive so we defaulted to lower-case but seems like that policy was not 100%.

Point 2 is a red herring. It had nothing to do with the case of the schema.. I'll file a different issue report for the underlying cause there later.