datajoint/datajoint-matlab

Trigger `dj.createSchema` from `dj.new`

Closed this issue · 2 comments

Currently when you want to create a new table in a new schema, it is a two steps process: you have to call dj.createSchema first to create the schema (with appropriate getSchema.m) and then you can call dj.new to create a new table in an existing schema. If you try to use dj.new on a non-existent schema, an error is thrown.

Although having a separate dj.createSchema makes sense and should be maintained, it will make sense for dj.new to trigger dj.createSchema if the user specifies to create a table in a non-existent schema. This will greatly simplify the table creation process.

Currently datajoint-matlab relies on a few interactive wizards that work only interactively without a non-interactive alternative. Perhaps we should ensure that all these wizards also work non-interactively so that scripts could be automated for testing, for example.

That's a good point. We may consider having some sort of a config value that can be set to allow for non-interactive mode. I'll create a separate issue to discuss this point further. As far as this particular issue is concerned, I'll consider it fixed with PR #68.