mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 17:15:51 +02:00
Updated doctrine recipes.
This commit is contained in:
parent
6388c92afc
commit
64cf8097bc
4 changed files with 19 additions and 41 deletions
8
.env
8
.env
|
@ -21,10 +21,12 @@ APP_SECRET=7915fd8481d1a52cf42010ebe2caa974
|
|||
###< symfony/framework-bundle ###
|
||||
|
||||
###> doctrine/doctrine-bundle ###
|
||||
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
|
||||
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
|
||||
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
|
||||
# Configure your db driver and server_version in config/packages/doctrine.yaml
|
||||
DATABASE_URL=mysql://root:@127.0.0.1:3306/part-db
|
||||
# For a PostgreSQL database, use: "postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=11&charset=utf8"
|
||||
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
|
||||
#DATABASE_URL=mysql://root:@127.0.0.1:3306/part-db?serverVersion=5.7
|
||||
DATABASE_URL=mysql://root:@127.0.0.1:3306/part-db?serverVersion=5.7
|
||||
###< doctrine/doctrine-bundle ###
|
||||
|
||||
### Custom vars
|
||||
|
|
|
@ -1,23 +1,11 @@
|
|||
parameters:
|
||||
# Adds a fallback DATABASE_URL if the env var is not set.
|
||||
# This allows you to run cache:warmup even if your
|
||||
# environment variables are not available yet.
|
||||
# You should not need to change this value.
|
||||
env(DATABASE_URL): ''
|
||||
|
||||
doctrine:
|
||||
dbal:
|
||||
# configure these for your database server
|
||||
# Doctrine should be able to detect these settings automatically, so just override them if you getting errors.
|
||||
#driver: 'pdo_mysql'
|
||||
#server_version: '5.6'
|
||||
|
||||
charset: utf8mb4
|
||||
default_table_options:
|
||||
charset: utf8mb4
|
||||
collate: utf8mb4_unicode_ci
|
||||
|
||||
url: '%env(resolve:DATABASE_URL)%'
|
||||
|
||||
# IMPORTANT: You MUST configure your server version,
|
||||
# either here or in the DATABASE_URL env var (see .env file)
|
||||
#server_version: '5.7'
|
||||
|
||||
types:
|
||||
datetime:
|
||||
class: App\Helpers\UTCDateTimeType
|
||||
|
|
|
@ -2,26 +2,14 @@ doctrine:
|
|||
orm:
|
||||
auto_generate_proxy_classes: false
|
||||
metadata_cache_driver:
|
||||
type: service
|
||||
id: doctrine.system_cache_provider
|
||||
type: pool
|
||||
pool: doctrine.system_cache_pool
|
||||
query_cache_driver:
|
||||
type: service
|
||||
id: doctrine.system_cache_provider
|
||||
type: pool
|
||||
pool: doctrine.system_cache_pool
|
||||
result_cache_driver:
|
||||
type: service
|
||||
id: doctrine.result_cache_provider
|
||||
|
||||
services:
|
||||
doctrine.result_cache_provider:
|
||||
class: Symfony\Component\Cache\DoctrineProvider
|
||||
public: false
|
||||
arguments:
|
||||
- '@doctrine.result_cache_pool'
|
||||
doctrine.system_cache_provider:
|
||||
class: Symfony\Component\Cache\DoctrineProvider
|
||||
public: false
|
||||
arguments:
|
||||
- '@doctrine.system_cache_pool'
|
||||
type: pool
|
||||
pool: doctrine.result_cache_pool
|
||||
|
||||
framework:
|
||||
cache:
|
||||
|
|
|
@ -54,12 +54,12 @@
|
|||
"version": "v2.9.2"
|
||||
},
|
||||
"doctrine/doctrine-bundle": {
|
||||
"version": "1.6",
|
||||
"version": "2.0",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "master",
|
||||
"version": "1.6",
|
||||
"ref": "453e89b78ded666f351617baca5ae40d20622351"
|
||||
"version": "2.0",
|
||||
"ref": "a9f2463b9f73efe74482f831f03a204a41328555"
|
||||
},
|
||||
"files": [
|
||||
"./config/packages/doctrine.yaml",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue