Name

rebuild_all_automdates — rebuild the automatic Mdates of all individuals

Synopsis

int rebuild_all_automdates ( );  
 

Description

This procedure rebuilds the automatic Mdates of all individuals on the CENSUS table.

Warning

This routine should not be run while triggers (automatic data validation) are enabled.

Example

-- Turn off triggers by e.g.:
--   cd db/triggers
--   make BABASE_DB=babase_foo destroy
BEGIN;
-- Empty those tables that could refer to automdates.
DELETE FROM cycstats;
DELETE FROM mmintervals;
DELETE FROM mdintervals;
SELECT rebuild_all_automdates();
-- Commit so that triggers can be re-installed.
COMMIT;
-- Re-install trigges by e.g.:
--   cd db/triggers
--   make BABASE_DB=babase_foo install
BEGIN;
-- Rebuild the cycles.seq and cycles.series columns
SELECT rebuild_all_cycles();
-- Rebuild the tables temporarly emptied.
SELECT rebuild_all_cycstats();
SELECT rebuild_all_mmintervals();
SELECT rebuild_all_mdintervals();
COMMIT;


Page generated: 2016-07-22T23:08:46-04:00.