datajoint-matlab icon indicating copy to clipboard operation
datajoint-matlab copied to clipboard

Schema name must start with lower case

Open bartkrekelberg opened this issue 2 years ago • 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 avatar Mar 17 '23 11:03 bartkrekelberg

@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%.

guzman-raphael avatar Mar 17 '23 17:03 guzman-raphael

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.

bartkrekelberg avatar Mar 22 '23 09:03 bartkrekelberg