mirror of
				https://github.com/abhinavxd/libredesk.git
				synced 2025-11-03 21:43:35 +00:00 
			
		
		
		
	fix remove unncessary indexes on webhooks table
This commit is contained in:
		@@ -48,7 +48,6 @@ func V0_7_0(db *sqlx.DB, fs stuffbin.FileSystem, ko *koanf.Koanf) error {
 | 
				
			|||||||
			CONSTRAINT constraint_webhooks_on_secret CHECK (length(secret) <= 255),
 | 
								CONSTRAINT constraint_webhooks_on_secret CHECK (length(secret) <= 255),
 | 
				
			||||||
			CONSTRAINT constraint_webhooks_on_events_not_empty CHECK (array_length(events, 1) > 0)
 | 
								CONSTRAINT constraint_webhooks_on_events_not_empty CHECK (array_length(events, 1) > 0)
 | 
				
			||||||
		);
 | 
							);
 | 
				
			||||||
		CREATE INDEX IF NOT EXISTS index_webhooks_on_is_active ON webhooks (is_active);
 | 
					 | 
				
			||||||
	`)
 | 
						`)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return err
 | 
							return err
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -594,8 +594,6 @@ CREATE TABLE webhooks (
 | 
				
			|||||||
	CONSTRAINT constraint_webhooks_on_secret CHECK (length(secret) <= 255),
 | 
						CONSTRAINT constraint_webhooks_on_secret CHECK (length(secret) <= 255),
 | 
				
			||||||
	CONSTRAINT constraint_webhooks_on_events_not_empty CHECK (array_length(events, 1) > 0)
 | 
						CONSTRAINT constraint_webhooks_on_events_not_empty CHECK (array_length(events, 1) > 0)
 | 
				
			||||||
);
 | 
					);
 | 
				
			||||||
CREATE INDEX index_webhooks_on_created_at ON webhooks (created_at);
 | 
					 | 
				
			||||||
CREATE INDEX index_webhooks_on_events ON webhooks USING GIN (events);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
INSERT INTO ai_providers
 | 
					INSERT INTO ai_providers
 | 
				
			||||||
("name", provider, config, is_default)
 | 
					("name", provider, config, is_default)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user