diff --git a/.env b/.env index e45b094..b313b47 100644 --- a/.env +++ b/.env @@ -14,7 +14,7 @@ APP_SECRET=xxx # For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db" # 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 -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 ### ###> sentry/sentry-symfony ### diff --git a/config/packages/doctrine.yaml b/config/packages/doctrine.yaml index 26d7f45..d250885 100644 --- a/config/packages/doctrine.yaml +++ b/config/packages/doctrine.yaml @@ -15,7 +15,7 @@ doctrine: url: '%env(resolve:APP_DATABASE_URL)%' #server_version: 9.6 magneticod: - driver: 'pdo_sqlite' + driver: 'pdo_pgsql' url: '%env(resolve:MAGNETICOD_DATABASE_URL)%' orm: auto_generate_proxy_classes: '%kernel.debug%' @@ -41,4 +41,3 @@ doctrine: dir: '%kernel.project_dir%/src/Magnetico/Entity' prefix: 'App\Magnetico' alias: Magnetico - diff --git a/src/Magnetico/Entity/File.php b/src/Magnetico/Entity/File.php index e27477b..e26cd32 100644 --- a/src/Magnetico/Entity/File.php +++ b/src/Magnetico/Entity/File.php @@ -6,7 +6,7 @@ use Doctrine\ORM\Mapping as ORM; 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\Entity(readOnly=true) @@ -34,7 +34,7 @@ class File * * @Serializer\Groups({"api_v1_show"}) * - * @ORM\Column(name="size", type="integer", nullable=false) + * @ORM\Column(name="size", type="bigint", nullable=false) */ private $size; diff --git a/src/Magnetico/Entity/Torrent.php b/src/Magnetico/Entity/Torrent.php index 81763ab..9f02de8 100644 --- a/src/Magnetico/Entity/Torrent.php +++ b/src/Magnetico/Entity/Torrent.php @@ -7,7 +7,7 @@ use Doctrine\ORM\Mapping as ORM; 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="info_hash_index", columns={"info_hash"}) * }) @@ -53,7 +53,7 @@ class Torrent * * @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;