Fix tempmon alembic script per continuum needs
is this really what we have to do now..?
This commit is contained in:
		
							parent
							
								
									5d81ac19a6
								
							
						
					
					
						commit
						32eb01fe09
					
				
					 1 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -8,7 +8,7 @@ from __future__ import unicode_literals, absolute_import
 | 
			
		|||
from alembic import context
 | 
			
		||||
 | 
			
		||||
from rattail.config import make_config
 | 
			
		||||
from rattail_tempmon.db import model as tempmon
 | 
			
		||||
from rattail.db.config import configure_versioning
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# this is the Alembic Config object, which provides
 | 
			
		||||
| 
						 | 
				
			
			@ -16,7 +16,12 @@ from rattail_tempmon.db import model as tempmon
 | 
			
		|||
alembic_config = context.config
 | 
			
		||||
 | 
			
		||||
# Use same config file for Rattail, as we are for Alembic.
 | 
			
		||||
rattail_config = make_config(alembic_config.config_file_name)
 | 
			
		||||
rattail_config = make_config(alembic_config.config_file_name, usedb=False)
 | 
			
		||||
 | 
			
		||||
# configure Continuum...this is trickier than I'd like
 | 
			
		||||
configure_versioning(rattail_config)
 | 
			
		||||
from rattail_tempmon.db import model as tempmon
 | 
			
		||||
orm.configure_mappers()
 | 
			
		||||
 | 
			
		||||
# add your model's MetaData object here
 | 
			
		||||
# for 'autogenerate' support
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue