lifecycle/migrate: don't migrate tenants if not enabled (#12850)
This commit is contained in:
		 Marc 'risson' Schmitt
					Marc 'risson' Schmitt
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							773c57b8d7
						
					
				
				
					commit
					92d6d74c2d
				
			| @ -1,5 +1,6 @@ | |||||||
| #!/usr/bin/env python | #!/usr/bin/env python | ||||||
| """System Migration handler""" | """System Migration handler""" | ||||||
|  |  | ||||||
| from importlib.util import module_from_spec, spec_from_file_location | from importlib.util import module_from_spec, spec_from_file_location | ||||||
| from inspect import getmembers, isclass | from inspect import getmembers, isclass | ||||||
| from os import environ, system | from os import environ, system | ||||||
| @ -112,6 +113,7 @@ def run_migrations(): | |||||||
|                 "forget to activate a virtual environment?" |                 "forget to activate a virtual environment?" | ||||||
|             ) from exc |             ) from exc | ||||||
|         execute_from_command_line(["", "migrate_schemas"]) |         execute_from_command_line(["", "migrate_schemas"]) | ||||||
|  |         if CONFIG.get_bool("tenants.enabled", False): | ||||||
|             execute_from_command_line(["", "migrate_schemas", "--schema", "template", "--tenant"]) |             execute_from_command_line(["", "migrate_schemas", "--schema", "template", "--tenant"]) | ||||||
|         execute_from_command_line( |         execute_from_command_line( | ||||||
|             ["", "check"] + ([] if CONFIG.get_bool("debug") else ["--deploy"]) |             ["", "check"] + ([] if CONFIG.get_bool("debug") else ["--deploy"]) | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user