Changes between Version 9 and Version 10 of DatabaseCleanup
- Timestamp:
- Jun 9, 2017, 2:28:51 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DatabaseCleanup
v9 v10 118 118 order by 2 119 119 }}} 120 121 DANGEROUS: Set `system_status` of every last version of `is_reference_of` relations with target 74095 to `CURRENT_VERSION`. (Needs two nested subselects and safe_mode=off) 122 {{{ 123 update node 124 set system_status = 'CURRENT_VERSION' 125 -- select * from node 126 where (id, version) in 127 ( 128 select * from 129 ( 130 select id, max(version) 131 from node 132 where 133 target_id = 74095 134 and object_class = 'is_reference_of' 135 group by id 136 ) as d 137 ) 138 }}}