Makefile smazáno sync_test_db (používá se sync_test_db_aggressive)
This commit is contained in:
		
							parent
							
								
									b84fc5cd64
								
							
						
					
					
						commit
						ded971a590
					
				
					 1 changed files with 1 additions and 10 deletions
				
			
		
							
								
								
									
										11
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								Makefile
									
									
									
									
									
								
							|  | @ -114,16 +114,7 @@ sync_test_media: | ||||||
| 	@if [ `readlink -f .` != "/aux/akce/mam/www/mamweb-test" ]; then echo "Only possible in /akce/mam/www/mamweb-test"; exit 1; fi | 	@if [ `readlink -f .` != "/aux/akce/mam/www/mamweb-test" ]; then echo "Only possible in /akce/mam/www/mamweb-test"; exit 1; fi | ||||||
| 	rsync -av --delete /akce/mam/www/mamweb-prod/media/ ./media | 	rsync -av --delete /akce/mam/www/mamweb-prod/media/ ./media | ||||||
| 
 | 
 | ||||||
| # Sync test database with production database
 | # Sync (with drop) test database with production database
 | ||||||
| sync_test_db: |  | ||||||
| 	@if [ ${USER} != "mam-web" ]; then echo "Only possible by user mam-web"; exit 1; fi |  | ||||||
| 	pg_dump mam_test > dump-test-`date +"%Y%m%d_%H%M"`.sql |  | ||||||
| 	pg_dump -Fc mam_prod > dump-prod.sql |  | ||||||
| 	pg_restore -c --if-exists -d mam_test dump-prod.sql |  | ||||||
| 	rm dump-prod.sql |  | ||||||
| 	@echo Done. |  | ||||||
| 	 |  | ||||||
| # Aggresive variant: destroy original mam_test db with 'DROP OWNED BY "mam-web";'
 |  | ||||||
| sync_test_db_aggressive: | sync_test_db_aggressive: | ||||||
| 	@if [ ${USER} != "mam-web" ]; then echo "Only possible by user mam-web"; exit 1; fi | 	@if [ ${USER} != "mam-web" ]; then echo "Only possible by user mam-web"; exit 1; fi | ||||||
| 	pg_dump mam_test > dump-test-`date +"%Y%m%d_%H%M"`.sql | 	pg_dump mam_test > dump-test-`date +"%Y%m%d_%H%M"`.sql | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue