How to change selected Data Structure (in DB) - BEXIS2/Core GitHub Wiki
Change Data structure
- Important: Do not change or delete directly in the database without a current backup!
Data structure not in use
Table datasets
- change ID in column datastructureref
Data structure already in use (file)
Table datasets
- change ID in column datastructureref
Data structure already in use (tabular data)
- create a new data structure which is identical in the column names, position and data types
Table variables/missingvalues
- Select used missing values for old and new datastructure
SELECT * FROM public.variables LEFT JOIN missingvalues on variables.ID = variableref WHERE datastructureref = '1286'
SELECT * FROM public.variables LEFT JOIN missingvalues on variables.ID = variableref WHERE datastructureref = '1287'
- Compare result, if not equal update table missing values
Table datasets
- change ID in column datastructureref
- delete old data structure
Update Materialized View
- Delete related materialized view
- Click on "sync" under Manage Datasets to create a new view referencing the new variable Ids