update some of the old attach.flag values to the new schema
This commit is contained in:
		| @@ -1669,6 +1669,21 @@ function update_r1143() { | ||||
| } | ||||
|  | ||||
| function update_r1144() { | ||||
| 	// hubzilla update does not apply here, but we're keeping the numbers in sync | ||||
| 	$r = q("select flags, id from attach where flags != 0"); | ||||
| 	if($r) { | ||||
| 		foreach($r as $rr) { | ||||
| 			if($rr['flags'] & 1) { | ||||
| 				q("update attach set is_dir = 1 where id = %d", | ||||
| 					intval($rr['id']) | ||||
| 				); | ||||
| 			} | ||||
| 			if($rr['flags'] & 2) { | ||||
| 				q("update attach set os_storage = 1 where id = %d", | ||||
| 					intval($rr['id']) | ||||
| 				); | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	return UPDATE_SUCCESS; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user