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

syncDef missing [nullable] & comment properties

Open Alvalunasan opened this issue 2 years ago • 2 comments

Bug Report

Description

function syncDef misses [nullable] flag and field comments for foreign keys fields.

Reproducibility

Include:

  • OS MACOS | 12.4
  • MATLAB Version 2020a
  • MySQL Version 10.2.33-MariaDB
  • MySQL Deployment Strategy (remote)
  • DataJoint Version 3.5.0
  • Minimum number of steps to reliably reproduce the issue
  1. Create a table with a foreign key with nullable fields and comments on these fields.
%{
# Defined optogenetic protocols for training
optogenetic_protocol_id   : int AUTO_INCREMENT      # 
---
protocol_description    : varchar(256)         # String that describes stimulation protocol
-> [nullable] optogenetics.OptogeneticStimulationParameter # Stimulation parameters associated with this stim protocol
-> [nullable] optogenetics.OptogeneticWaveform
%}
  1. run syncDef over this table.

Expected Behavior

Expected to have [nullable] foreign keys imported correctly. Expected to have imported field comments

Screenshots

Results after syncDef:

%{
# Defined optogenetic protocols for training
optogenetic_protocol_id   : int AUTO_INCREMENT      # 
---
protocol_description    : varchar(256)         # string that describes stimulation protocol
-> optogenetics.OptogeneticStimulationParameter
-> optogenetics.OptogeneticWaveform
%}

"Real" table in DB Screen Shot 2022-06-24 at 10 26 42 AM

Alvalunasan avatar Jun 24 '22 14:06 Alvalunasan

Thanks @Alvalunasan. We are reviewing now.

kabilar avatar Jun 29 '22 13:06 kabilar

Related to #305

guzman-raphael avatar Jun 30 '22 16:06 guzman-raphael