3/2/2024 0 Comments Sqlite order by exampleSee the Knex.js documentation for more information Time in milliseconds to idle before retrying failed create actionsĬallback function to execute custom logic when the pool acquires a new connection. Time in milliseconds to check for idle database connections to destroy Time in milliseconds before free database connections are destroyed Time in milliseconds before timing out a destroy query attempt Time in milliseconds before timing out a create query attempt Time in milliseconds before timing out a database connection attempt Maximum number of database connections to keepalive Minimum number of database connections to keepalive When using Docker, change the pool min value to 0 as Docker will kill any idle connections, making it impossible to keep any open connections to the database (see the Tarn.js pool settings used by Knex.js for more information). Use an object to pass certificate files as strings. Password used to establish the connection Username used to establish the connection To disable use an empty string: ''.ĭatabase host name. When set, it overrides the other nnection properties. config/database.ts for TypeScript) is used to pass database connection information and accepts the following parameters: Parameterĭatabase connection string. How long knex will wait before throwing a timeout error when acquiring a connection (in milliseconds)Ī client value of 'sqlite' will be modified by Strapi to be 'better-sqlite3' if the package is available in your project, or 'sqlite3' if it is not. sqlite or postgres or mysql (or mysql2, see additional details settings for Strapi-specific database settingsĬonnection configuration object Parameterĭatabase client to create the connection.connection for database configuration options passed to Knex.js. config/database.ts for TypeScript) accepts 2 main configuration objects: See environment variables in database configurations Configuration structure Only new projects created after the v4.6.2 release will include the new configuration, however, earlier projects can utilize the new configuration by manually modifying the. Strapi v4.6.2 introduced a new format for the database configuration file that allows all of the database configuration properties to be set using environment variables.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |