How to use physical schema in 2022.9

Hi all

since I’ve just upgraded to 2022.9 and it’s working as expected
one of the long-waited features was physical schema (tables instead of EAV modeling)

the thing is just checked the DB tables and saw no tables for my Modules!
are there any configurations I should do? and how?

this is from the documentation

Redefined record storage
Corteza 2022.9 redefines how data is stored internally to improve performance, scalability, and flexibility. Corteza now supports the administrators to define external databases and configure dedicated, stand-alone data storage locations for modules.

I wonder what exactly is this referring to?!

1 Like

@munawir ,

I also struggled with this.

Create a new module, and before saving go into the “data store” tab. There you can set all of the column types to “Column” instead of “JSON” and the “collection or database table name” to a value that you choose. I’ve been using the template value {{module}} for all of my tables.

But be warned, as of the time of this post, support for physcial tables is not fully baked. You can see a list of bugs that I’ve filed on the github issues page

To be more explicit, these are the relevant issues as of today.

1 Like

thank you @shmuel for sharing

I’ve tried it but no luck for me, each time I save a from data store tap I got issues

and nothing changed in DB however the records disappeared from the record-list page !!!
(I guess a broken migration … this should have a fallback scenario)

appreciate an explanation for these messages?
and how the migration happened… I mean of an existing module with more than 100K records how that’s going to happen?

Two issues here are that

  1. you can’t convert a table from non physical to physical (I’m not sure if that’s a bug, maybe file an issue on github).
  2. Dropdowns aren’t currently supported. (see here for the feature request)

You’re observing the ‘not fully baked’ description I noted above :smiley: .

1 Like

This is somewhat supported but probably not what you’d like – you can connect existing modules to dedicated tables, but the records won’t be automatically migrated.
We will be adding some sort of a migration option but it’s not there yet.

As for the rest of the issues reported by @shmuel we’re working on those; thank you for reporting!


Thanks @tjerman

@munawir some critical issues have been addressed. The next release will be a smoother ride.

thanks @tjerman and good luck

@shmuel my production instance still using 2022.3.5
I won’t upgrade it till it’s stable (as you said fully backed)

will wait for the next release and try it with a testing environment

1 Like