You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add option to create schema tables without constraints #81
Currently, generateSqlSchema will generate SQL to create a schema based on the results data model specification which may include constraints (primary keys at the moment). In the case that we are bulk-loading results from a study, we may want to add constraints after data is loaded.
I'd propose we extend generateSqlSchema to allow for a new parameter includeConstraints = TRUE so we can optionally disable constraints. The add another function generateSqlContraints to generate the SQL necessary to apply any/all constraints.
This could be included but it will likely be challenging to add constraints in afterwards.
The develop branch currently has a function for using python postgres uploads that disables the constraints on the fly.
I wonder if this approach is more useful in the circumstance where the data sets are large?
Disabling constraints will also not necessarily disable custom indexes, which is generally the reason for slow insert times.
Activity
azimov commentedon Aug 28, 2025
This could be included but it will likely be challenging to add constraints in afterwards.
The develop branch currently has a function for using python postgres uploads that disables the constraints on the fly.
I wonder if this approach is more useful in the circumstance where the data sets are large?
Disabling constraints will also not necessarily disable custom indexes, which is generally the reason for slow insert times.