| 
									
										
										
										
											2019-06-18 18:33:53 +02:00
										 |  |  | const sqlite = { | 
					
						
							| 
									
										
										
										
											2021-05-17 16:34:19 +02:00
										 |  |  |   client: 'sqlite', | 
					
						
							|  |  |  |   connection: { | 
					
						
							| 
									
										
										
										
											2019-06-18 18:33:53 +02:00
										 |  |  |     filename: '.tmp/data.db', | 
					
						
							|  |  |  |   }, | 
					
						
							| 
									
										
										
										
											2021-05-17 16:34:19 +02:00
										 |  |  |   useNullAsDefault: true, | 
					
						
							| 
									
										
										
										
											2019-06-18 18:33:53 +02:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const postgres = { | 
					
						
							| 
									
										
										
										
											2021-06-28 12:34:29 +02:00
										 |  |  |   client: 'postgres', | 
					
						
							| 
									
										
										
										
											2021-05-17 16:34:19 +02:00
										 |  |  |   connection: { | 
					
						
							| 
									
										
										
										
											2019-06-18 18:33:53 +02:00
										 |  |  |     database: 'strapi', | 
					
						
							| 
									
										
										
										
											2021-08-06 09:18:11 +02:00
										 |  |  |     user: 'strapi', | 
					
						
							| 
									
										
										
										
											2019-06-18 18:33:53 +02:00
										 |  |  |     password: 'strapi', | 
					
						
							|  |  |  |     port: 5432, | 
					
						
							|  |  |  |     host: 'localhost', | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-09 14:39:59 +02:00
										 |  |  | const mysql = { | 
					
						
							| 
									
										
										
										
											2021-06-28 12:34:29 +02:00
										 |  |  |   client: 'mysql', | 
					
						
							| 
									
										
										
										
											2021-05-17 16:34:19 +02:00
										 |  |  |   connection: { | 
					
						
							| 
									
										
										
										
											2019-07-09 14:39:59 +02:00
										 |  |  |     database: 'strapi', | 
					
						
							| 
									
										
										
										
											2021-08-06 09:18:11 +02:00
										 |  |  |     user: 'strapi', | 
					
						
							| 
									
										
										
										
											2019-07-09 14:39:59 +02:00
										 |  |  |     password: 'strapi', | 
					
						
							|  |  |  |     port: 3306, | 
					
						
							|  |  |  |     host: 'localhost', | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-16 18:30:38 +01:00
										 |  |  | const mariadb = { | 
					
						
							|  |  |  |   client: 'mysql', | 
					
						
							|  |  |  |   connection: { | 
					
						
							|  |  |  |     database: 'strapi', | 
					
						
							|  |  |  |     user: 'strapi', | 
					
						
							|  |  |  |     password: 'strapi', | 
					
						
							|  |  |  |     port: 3307, | 
					
						
							|  |  |  |     host: 'localhost', | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-18 18:33:53 +02:00
										 |  |  | const db = { | 
					
						
							| 
									
										
										
										
											2019-07-09 14:39:59 +02:00
										 |  |  |   mysql, | 
					
						
							| 
									
										
										
										
											2019-06-18 18:33:53 +02:00
										 |  |  |   sqlite, | 
					
						
							|  |  |  |   postgres, | 
					
						
							| 
									
										
										
										
											2022-11-16 18:30:38 +01:00
										 |  |  |   mariadb, | 
					
						
							| 
									
										
										
										
											2019-06-18 18:33:53 +02:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | module.exports = { | 
					
						
							| 
									
										
										
										
											2021-05-17 16:34:19 +02:00
										 |  |  |   connection: process.env.DB ? db[process.env.DB] || db.sqlite : db.sqlite, | 
					
						
							| 
									
										
										
										
											2019-06-18 18:33:53 +02:00
										 |  |  | }; |