mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 14:27:57 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			10 lines
		
	
	
		
			351 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			351 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| -- Insert Default category
 | |
| INSERT OR IGNORE INTO categories(_id, name, sort, flags) VALUES (0, "", -1, 0);
 | |
| -- Disallow deletion of default category
 | |
| CREATE TRIGGER IF NOT EXISTS system_category_delete_trigger BEFORE DELETE
 | |
| ON categories
 | |
| BEGIN SELECT CASE
 | |
|     WHEN old._id <= 0 THEN
 | |
|         RAISE(ABORT, "System category can't be deleted")
 | |
|     END;
 | |
| END; |