You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible generate schema only use info form entity, not to load actual schema from DB?
Problem:
I use "cycle/orm and co" among with symfony. Schema is compiled while cache:clear, cache:clear is run while docker build.
As there is no db connection, this error occur.
[PDOException (7)]
SQLSTATE[08006] [7] could not translate host name "db" to address: Name does not resolve
Exception trace:
at /srv/app/vendor/cycle/database/src/Driver/Driver.php:637
PDO->__construct() at /srv/app/vendor/cycle/database/src/Driver/Driver.php:637
Cycle\Database\Driver\Driver->createPDO() at /srv/app/vendor/cycle/database/src/Driver/Postgres/PostgresDriver.php:213
Cycle\Database\Driver\Postgres\PostgresDriver->createPDO() at /srv/app/vendor/cycle/database/src/Driver/Driver.php:200
Cycle\Database\Driver\Driver->connect() at /srv/app/vendor/cycle/database/src/Driver/Driver.php:653
Cycle\Database\Driver\Driver->getPDO() at /srv/app/vendor/cycle/database/src/Driver/Driver.php:487
Cycle\Database\Driver\Driver->prepare() at /srv/app/vendor/cycle/database/src/Driver/Driver.php:443
Cycle\Database\Driver\Driver->statement() at /srv/app/vendor/cycle/database/src/Driver/Driver.php:457
Cycle\Database\Driver\Driver->statement() at /srv/app/vendor/cycle/database/src/Driver/Driver.php:253
Cycle\Database\Driver\Driver->query() at /srv/app/vendor/cycle/database/src/Driver/Postgres/PostgresHandler.php:71
Cycle\Database\Driver\Postgres\PostgresHandler->hasTable() at /srv/app/vendor/cycle/database/src/Schema/AbstractTable.php:99
Cycle\Database\Schema\AbstractTable->__construct() at /srv/app/vendor/cycle/database/src/Driver/Postgres/PostgresHandler.php:31
Cycle\Database\Driver\Postgres\PostgresHandler->getSchema() at /srv/app/vendor/cycle/database/src/Table.php:88
Cycle\Database\Table->getSchema() at /srv/app/vendor/cycle/schema-builder/src/Registry.php:161
Cycle\Schema\Registry->linkTable() at /srv/app/vendor/cycle/annotated/src/Entities.php:80
Cycle\Annotated\Entities->run() at /srv/app/vendor/cycle/schema-builder/src/Compiler.php:57
Cycle\Schema\Compiler->compile() at /srv/app/package/CycleORMBundle/src/Service/SchemaCompiler.php:26
As a workaround, I do cache:clear at startup time.
But it loads DB, every kubernetes pod get schema from DB at the same time.
The text was updated successfully, but these errors were encountered:
Btw I recommend to store ORM schema as a PHP file in git.
Yes, I though about it. Trigger re-generate schema just after migration:(up|down) is finished.
For small-size team it will work, but for mid+, a lot of git conflict while merge can be a really annoying.
Is it possible generate schema only use info form entity, not to load actual schema from DB?
Problem:
I use "cycle/orm and co" among with symfony. Schema is compiled while cache:clear, cache:clear is run while docker build.
As there is no db connection, this error occur.
As a workaround, I do cache:clear at startup time.
But it loads DB, every kubernetes pod get schema from DB at the same time.
The text was updated successfully, but these errors were encountered: