mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 01:57:45 +08:00 
			
		
		
		
	 9b618d2447
			
		
	
	9b618d2447
	
	
	
		
			
			Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: shashank_attarde <shashank.attarde@juspay.in> Co-authored-by: Aprabhat19 <amishaprabhat@gmail.com> Co-authored-by: Amisha Prabhat <55580080+Aprabhat19@users.noreply.github.com>
		
			
				
	
	
		
			20 lines
		
	
	
		
			698 B
		
	
	
	
		
			SQL
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			698 B
		
	
	
	
		
			SQL
		
	
	
	
	
	
| -- Your SQL goes here
 | |
| 
 | |
| CREATE TYPE "RoutingAlgorithmKind" AS ENUM ('single', 'priority', 'volume_split', 'advanced');
 | |
| 
 | |
| CREATE TABLE routing_algorithm (
 | |
|     algorithm_id VARCHAR(64) PRIMARY KEY,
 | |
|     profile_id VARCHAR(64) NOT NULL,
 | |
|     merchant_id VARCHAR(64) NOT NULL,
 | |
|     name VARCHAR(64) NOT NULL,
 | |
|     description VARCHAR(256),
 | |
|     kind "RoutingAlgorithmKind" NOT NULL,
 | |
|     algorithm_data JSONB NOT NULL,
 | |
|     created_at TIMESTAMP NOT NULL,
 | |
|     modified_at TIMESTAMP NOT NULL
 | |
| );
 | |
| 
 | |
| CREATE INDEX routing_algorithm_profile_id_modified_at ON routing_algorithm (profile_id, modified_at DESC);
 | |
| 
 | |
| CREATE INDEX routing_algorithm_merchant_id_modified_at ON routing_algorithm (merchant_id, modified_at DESC);
 |