Armaan Tobaccowalla
					
					5 years ago
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: A4E72C72701AFDFE
						
					
				
			
		
		
		
	
		
			
				 1 changed files with 
4 additions and 
2 deletions
			 
			
		 
		
			
				- 
					
					
					 
					src/config.rs
				
 
			
		
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
					@ -412,7 +412,9 @@ make_config! { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					fn validate_config(cfg: &ConfigItems) -> Result<(), Error> { | 
					 | 
					 | 
					fn validate_config(cfg: &ConfigItems) -> Result<(), Error> { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    let db_url = cfg.database_url.to_lowercase(); | 
					 | 
					 | 
					    let db_url = cfg.database_url.to_lowercase(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    if cfg!(feature = "sqlite") && (db_url.starts_with("mysql:") || db_url.starts_with("postgresql:")) { | 
					 | 
					 | 
					    if cfg!(feature = "sqlite") | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        && (db_url.starts_with("mysql:") || db_url.starts_with("postgresql:") || db_url.starts_with("postgres:")) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        err!("`DATABASE_URL` is meant for MySQL or Postgres, while this server is meant for SQLite") | 
					 | 
					 | 
					        err!("`DATABASE_URL` is meant for MySQL or Postgres, while this server is meant for SQLite") | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -420,7 +422,7 @@ fn validate_config(cfg: &ConfigItems) -> Result<(), Error> { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        err!("`DATABASE_URL` should start with mysql: when using the MySQL server") | 
					 | 
					 | 
					        err!("`DATABASE_URL` should start with mysql: when using the MySQL server") | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    if cfg!(feature = "postgresql") && !db_url.starts_with("postgresql:") { | 
					 | 
					 | 
					    if cfg!(feature = "postgresql") && !(db_url.starts_with("postgresql:") || db_url.starts_with("postgres:")) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        err!("`DATABASE_URL` should start with postgresql: when using the PostgreSQL server") | 
					 | 
					 | 
					        err!("`DATABASE_URL` should start with postgresql: when using the PostgreSQL server") | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |