Closed thomas-hiron closed 4 years ago
General error: 1 no such table
doctrine/data-fixtures
doesn't really concern itself with schema structure: it assumes that your schema is already in place.
You have to have a running DB with the generated/imported/migrated schema in it first.
I don't understand. The DB and each table are created with doctrine:schema:update --force
.
Everything is working fine when I chain those commands on my computer.
Maybe in CI you are connecting to a different DB due to parsed environment variables?
I'm using .env.dist
where the env var is the same as in my .env
file :/
I'll try to change the path but I'm sure that the dir exists!
That was indeed a misconfiguration, the db was created only in the running container, so not available for the next command..
I'm trying to run my tests with SQLite, I'm all set with docker on my computer, everything is working fine. But when I'm running them in the CI, fixtures can't load. I get an error:
SQLSTATE[HY000]: General error: 1 no such table
The table causing this error is not always the same (alterning between two tables).
I dumped sql queries and there is a query
CREATE TABLE
for this table.Here is the CI output:
And here is the doctrine configuration for test env:
The env var is:
sqlite:///%kernel.project_dir%/databases/pilote.db
Here is the basic doctrine configuration:
Why I have this behavior only in the CI and how can I fix it?
Thanks by advance!