Skip to content

syncDef missing [nullable] & comment properties #415

@Alvalunasan

Description

@Alvalunasan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting-triageIssues awaiting proper priority/milestone assignment.bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions