mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-03 23:14:13 +00:00 
			
		
		
		
	quote all symbols in hellspawn upgrade script
This commit is contained in:
		
							parent
							
								
									c9934c379f
								
							
						
					
					
						commit
						cc394d9a4b
					
				
					 1 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -11,23 +11,23 @@ The following script will correct any local or remote hellspawns in the database
 | 
			
		|||
 | 
			
		||||
```postgresql
 | 
			
		||||
/* Remove "instance is marked as NSFW" hellspawns */
 | 
			
		||||
UPDATE note
 | 
			
		||||
SET cw = null
 | 
			
		||||
UPDATE "note"
 | 
			
		||||
SET "cw" = null
 | 
			
		||||
WHERE
 | 
			
		||||
	"renoteId" IS NOT NULL
 | 
			
		||||
	AND "text" IS NULL
 | 
			
		||||
	AND cw = 'Instance is marked as NSFW'
 | 
			
		||||
	AND "cw" = 'Instance is marked as NSFW'
 | 
			
		||||
	AND "replyId" IS NULL
 | 
			
		||||
	AND "hasPoll" = false
 | 
			
		||||
	AND "fileIds" = '{}';
 | 
			
		||||
 | 
			
		||||
/* Fix legacy / user-created hellspawns */
 | 
			
		||||
UPDATE note
 | 
			
		||||
SET text = '.'
 | 
			
		||||
UPDATE "note"
 | 
			
		||||
SET "text" = '.'
 | 
			
		||||
WHERE
 | 
			
		||||
	"renoteId" IS NOT NULL
 | 
			
		||||
	AND "text" IS NULL
 | 
			
		||||
	AND cw IS NOT NULL
 | 
			
		||||
	AND "cw" IS NOT NULL
 | 
			
		||||
	AND "replyId" IS NULL
 | 
			
		||||
	AND "hasPoll" = false
 | 
			
		||||
	AND "fileIds" = '{}';
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue