| | 1 | = Record Merging = |
| | 2 | |
| | 3 | There are times when you have multiple records in the database which are duplicates. |
| | 4 | Rather than simply delete one of them, which may mean that other records don't point correctly at this one, it is possible to merge the 2 records together. |
| | 5 | |
| | 6 | Identify the 2 record IDs, decide which one you wish to keep & which one should be deprecated & then merge them as follows: |
| | 7 | {{{ |
| | 8 | auth.override=True |
| | 9 | resource = s3mgr.define_resource("pr", "person") |
| | 10 | # (Good, Bad) |
| | 11 | resource.merge(117, 90) |
| | 12 | db.commit() |
| | 13 | # or db.rollback() |
| | 14 | }}} |
| | 15 | |
| | 16 | It is also possible to specify that some fields should be retained from the one which is being deprecated. |
| | 17 | |
| | 18 | There may of course be addiional records, such as Human Resource or Contacts. |