mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: Enforce non-nullability of environment type (#950)
* fix: Enforce non-nullability of environment type
This commit is contained in:
		
							parent
							
								
									132e801836
								
							
						
					
					
						commit
						0bca321219
					
				| @ -0,0 +1,14 @@ | ||||
| 'use strict'; | ||||
| 
 | ||||
| exports.up = function (db, cb) { | ||||
|     db.runSql( | ||||
|         ` | ||||
|     UPDATE environments SET type = 'production' WHERE type IS null; | ||||
|     ALTER TABLE environments ALTER COLUMN type SET NOT NULL`,
 | ||||
|         cb, | ||||
|     ); | ||||
| }; | ||||
| 
 | ||||
| exports.down = function (db, cb) { | ||||
|     db.runSql(`ALTER TABLE environments ALTER COLUMN type DROP NOT NULL`, cb); | ||||
| }; | ||||
| @ -8,7 +8,7 @@ let app; | ||||
| let db; | ||||
| 
 | ||||
| beforeAll(async () => { | ||||
|     db = await dbInit('metrics_api_client', getLogger); | ||||
|     db = await dbInit('metrics_api_e2e_access_client', getLogger); | ||||
|     app = await setupAppWithAuth(db.stores); | ||||
| }); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user