On a brand new Postgres database
postgres:
container_name: postgres
image: "postgres:latest"
ports:
- 5432:5432
environment:
POSTGRES_USER: app
POSTGRES_PASSWORD: pass
networks:
app_network:
volumes:
- ./volumes/postgres:/var/lib/postgresql/data/
symfony 7.1
doctrinebundle 2.12.0
dbal 4.0.4
doctrine/orm: 3.2.1
install script:
docker exec -ti app php bin/console doctrine:database:create
docker exec -ti app php bin/console doctrine:migrations:sync-metadata-storage
docker exec -ti app php bin/console make:migration
docker exec -ti app php bin/console doctrine:migrations:migrate
docker run --rm -it --platform linux/amd64 --network app_network dimitri/pgloader:latest
pgloader
mysql://root:root@database/dev
pgsql://app:pass@postgres/dev
0 ERROR from pgloader
dbal settings:
dbal:
server_version: '15.3 (Debian 15.3-1.pgdg120+1'
dbname: 'dev'
host: 'postgres'
port: 5432
user: 'app'
password: 'pass'
driver: 'pdo_pgsql'
charset: 'utf8'
I also tried
url: "postgresql://app:pass@postgres:5432/dev?serverVersion=15.3 (Debian 15.3-1.pgdg120+1)&charset=utf8"
getting error The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue.
I have tried to
reruen the command docker exec -ti app php bin/console doctrine:migrations:sync-metadata-storage
manually remove the cache
nothing works…
for fun I ran docker exec -ti app php bin/console doctrine:schema:validate
result:
[ERROR] The database schema is not in sync with the current mapping file.
how can this be ? I went from a blank slate ? then
docker exec -ti app php bin/console doctrine:migrations:diff
result
The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue.
so I am running in circle