Set DCImanager db name without ENV=var
This commit is contained in:
		
							parent
							
								
									7c06a0eb00
								
							
						
					
					
						commit
						26f52e93aa
					
				@ -64,12 +64,12 @@ class AuthUser(BaseModel):
 | 
				
			|||||||
    email = CharField(constraints=[SQL("DEFAULT ''")], unique=True)
 | 
					    email = CharField(constraints=[SQL("DEFAULT ''")], unique=True)
 | 
				
			||||||
    email_confirm = IntegerField(constraints=[SQL("DEFAULT 0")])
 | 
					    email_confirm = IntegerField(constraints=[SQL("DEFAULT 0")])
 | 
				
			||||||
    full_name = CharField(null=True)
 | 
					    full_name = CharField(null=True)
 | 
				
			||||||
    ip_list = UnknownField(null=True)  # json
 | 
					    ip_list = JSONField(null=True)  # json
 | 
				
			||||||
    lang = CharField(constraints=[SQL("DEFAULT 'en'")])
 | 
					    lang = CharField(constraints=[SQL("DEFAULT 'en'")])
 | 
				
			||||||
    password = CharField(null=True)
 | 
					    password = CharField(null=True)
 | 
				
			||||||
    phone_number = CharField(null=True)
 | 
					    phone_number = CharField(null=True)
 | 
				
			||||||
    property = UnknownField(null=True)  # json
 | 
					    property = JSONField(null=True)  # json
 | 
				
			||||||
    roles = UnknownField()  # json
 | 
					    roles = JSONField()  # json
 | 
				
			||||||
    ssh_priv_key = TextField(null=True)
 | 
					    ssh_priv_key = TextField(null=True)
 | 
				
			||||||
    ssh_pub_key = TextField(null=True)
 | 
					    ssh_pub_key = TextField(null=True)
 | 
				
			||||||
    state = CharField()
 | 
					    state = CharField()
 | 
				
			||||||
 | 
				
			|||||||
@ -18,6 +18,9 @@ if DB_PASSWORD is None:
 | 
				
			|||||||
        platform_config = json.load(f)
 | 
					        platform_config = json.load(f)
 | 
				
			||||||
        DB_PASSWORD = platform_config.get("MysqlRootPassword")
 | 
					        DB_PASSWORD = platform_config.get("MysqlRootPassword")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if PLATFORM == "dci":
 | 
				
			||||||
 | 
					    DB_NAME == "auth"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
database = MySQLDatabase(
 | 
					database = MySQLDatabase(
 | 
				
			||||||
    DB_NAME, **{
 | 
					    DB_NAME, **{
 | 
				
			||||||
        'charset': 'utf8',
 | 
					        'charset': 'utf8',
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user