Using PostgreSQL for magneticod (Go) back-end.
This commit is contained in:
parent
56f787b484
commit
ad067aa19c
2
.env
2
.env
|
@ -14,7 +14,7 @@ APP_SECRET=xxx
|
||||||
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
|
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
|
||||||
# Configure your db driver and server_version in config/packages/doctrine.yaml
|
# Configure your db driver and server_version in config/packages/doctrine.yaml
|
||||||
APP_DATABASE_URL=postgres://$PGUSER:$PGPASSWORD@127.0.0.1:5436/test?application_name=magnetico_web
|
APP_DATABASE_URL=postgres://$PGUSER:$PGPASSWORD@127.0.0.1:5436/test?application_name=magnetico_web
|
||||||
MAGNETICOD_DATABASE_URL=sqlite:///%kernel.project_dir%/tests/database/database.sqlite3
|
MAGNETICOD_DATABASE_URL=postgres://$PGUSER:$PGPASSWORD@127.0.0.1:5436/test?application_name=magnetico_web
|
||||||
###< doctrine/doctrine-bundle ###
|
###< doctrine/doctrine-bundle ###
|
||||||
|
|
||||||
###> sentry/sentry-symfony ###
|
###> sentry/sentry-symfony ###
|
||||||
|
|
|
@ -15,7 +15,7 @@ doctrine:
|
||||||
url: '%env(resolve:APP_DATABASE_URL)%'
|
url: '%env(resolve:APP_DATABASE_URL)%'
|
||||||
#server_version: 9.6
|
#server_version: 9.6
|
||||||
magneticod:
|
magneticod:
|
||||||
driver: 'pdo_sqlite'
|
driver: 'pdo_pgsql'
|
||||||
url: '%env(resolve:MAGNETICOD_DATABASE_URL)%'
|
url: '%env(resolve:MAGNETICOD_DATABASE_URL)%'
|
||||||
orm:
|
orm:
|
||||||
auto_generate_proxy_classes: '%kernel.debug%'
|
auto_generate_proxy_classes: '%kernel.debug%'
|
||||||
|
@ -41,4 +41,3 @@ doctrine:
|
||||||
dir: '%kernel.project_dir%/src/Magnetico/Entity'
|
dir: '%kernel.project_dir%/src/Magnetico/Entity'
|
||||||
prefix: 'App\Magnetico'
|
prefix: 'App\Magnetico'
|
||||||
alias: Magnetico
|
alias: Magnetico
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ use Doctrine\ORM\Mapping as ORM;
|
||||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Table(name="files", indexes={
|
* @ORM\Table(schema="magneticod", name="files", indexes={
|
||||||
* @ORM\Index(name="file_info_hash_index", columns={"torrent_id"})
|
* @ORM\Index(name="file_info_hash_index", columns={"torrent_id"})
|
||||||
* })
|
* })
|
||||||
* @ORM\Entity(readOnly=true)
|
* @ORM\Entity(readOnly=true)
|
||||||
|
@ -34,7 +34,7 @@ class File
|
||||||
*
|
*
|
||||||
* @Serializer\Groups({"api_v1_show"})
|
* @Serializer\Groups({"api_v1_show"})
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="size", type="integer", nullable=false)
|
* @ORM\Column(name="size", type="bigint", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $size;
|
private $size;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ use Doctrine\ORM\Mapping as ORM;
|
||||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Table(name="torrents", indexes={
|
* @ORM\Table(schema="magneticod", name="torrents", indexes={
|
||||||
* @ORM\Index(name="discovered_on_index", columns={"discovered_on"}),
|
* @ORM\Index(name="discovered_on_index", columns={"discovered_on"}),
|
||||||
* @ORM\Index(name="info_hash_index", columns={"info_hash"})
|
* @ORM\Index(name="info_hash_index", columns={"info_hash"})
|
||||||
* })
|
* })
|
||||||
|
@ -53,7 +53,7 @@ class Torrent
|
||||||
*
|
*
|
||||||
* @Serializer\Groups({"api_v1_search", "api_v1_show"})
|
* @Serializer\Groups({"api_v1_search", "api_v1_show"})
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="total_size", type="integer", nullable=false)
|
* @ORM\Column(name="total_size", type="bigint", nullable=false)
|
||||||
*/
|
*/
|
||||||
private $totalSize;
|
private $totalSize;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue