OHDSI / ResultModelManager

RMM is an R package designed to handle common ohdsi results data management functions by providing a common API for data model migrations and definitions
https://ohdsi.github.io/ResultModelManager/
Apache License 2.0
3 stars 2 forks source link

Allow 'migrations' folder as subfolder of `sql`, not `sql/sql_server` #38

Open schuemie opened 10 months ago

schuemie commented 10 months ago

In recent versions of SqlRender it is allowed to put your OhdsiSql in the inst/sql folder instead of the inst/sql/sql_server folder, and loadRenderTranslateSql() will still work. The main reasons are

  1. Techincally, it's OhdsiSql, not SQL Server SQL,
  2. Looks prettier.
  3. SqlRender has proven to be very capable of handling cross-platform idiosyncrasies, so most (if not all) packages have no need for platform-specific SQL.

(Note that plafform-specific code can still be placed in the appropriately named subfolders. It is just that 99.9% of SQL is OhdsiSql, so why not put it up a level?)

Currently ResultModelManager throw an error if I put the 'migrations' folder in the 'sql' folder. A simple extra lookup when looking for migration SQL would solve this. Could this be added?

azimov commented 9 months ago

Because of the support for flat folder structures outside of a package this issue is not as straightforward to resolve as I would have liked, I will add this in a future version when I have a bit more time to test it fully.

schuemie commented 2 months ago

Just a reminder that it would still be nice to have this