mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	feat: frontend consumption table (#9523)
Similar to backend traffic, we have table for frontend traffic. We might want to rename the backend on to align with this one.
This commit is contained in:
		
							parent
							
								
									5f238d6b6d
								
							
						
					
					
						commit
						482443f373
					
				| @ -0,0 +1,23 @@ | |||||||
|  | 
 | ||||||
|  | exports.up = (db, callback) => { | ||||||
|  |     db.runSql( | ||||||
|  |         ` | ||||||
|  |         CREATE TABLE IF NOT EXISTS request_count_consumption( | ||||||
|  |             day DATE NOT NULL, | ||||||
|  |             metered_group TEXT NOT NULL, | ||||||
|  |             requests BIGINT NOT NULL DEFAULT 0, | ||||||
|  |             PRIMARY KEY(day, metered_group) | ||||||
|  |             ); | ||||||
|  |         `,
 | ||||||
|  |         callback, | ||||||
|  |     ); | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | exports.down = (db, callback) => { | ||||||
|  |     db.runSql( | ||||||
|  |         ` | ||||||
|  |         DROP TABLE IF EXISTS request_count_consumption; | ||||||
|  |         `,
 | ||||||
|  |         callback, | ||||||
|  |     ); | ||||||
|  | }; | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user