Intento seguir el ejemplo, pero no logro avanzar :S.
Este es el yml que tengo en schema:
Código XML:
Ver originaluser:
columns:
id:
primary: true
autoincrement: true
type: integer(10)
username: string(255)
password: string(255)
firts_name: string(255)
last_name: string(255)
al aplicar $ ./doctrine generate-models-yaml se genero todo correctamente.
y este es users.yml que esta en fixtures.
Código XML:
Ver original## YAML Template.
---
User:
jwage:
username: jwage
password: test
Al ejecutar por consala optengo:
en mysql
Código BASH:
Ver originaljorge@copia:/var/www/doctrine2/system/application$ ./doctrine build-all-reload
build-all-reload - Are you sure you wish to drop your databases? (y/n)
y
build-all-reload - Successfully dropped database for connection named 'ci_doctrine'
build-all-reload - Successfully created database for connection named 'ci_doctrine'
build-all-reload - Created tables successfully
Couldn't find class User
en postgres:
Código BASH:
Ver originaljorge@copia:/var/www/doctrine2/system/application$ ./doctrine build-all-reload
build-all-reload - Are you sure you wish to drop your databases? (y/n)
y
build-all-reload - PDO Connection Error: SQLSTATE[08006] [7] could not translate host name "postgres" to address: Name or service not known
build-all-reload - PDO Connection Error: SQLSTATE[08006] [7] could not translate host name "postgres" to address: Name or service not known
build-all-reload - Created tables successfully
Couldn't find class User
Dejo la estructura de la base de prueba tanto en mysql y postgres:
Nombre: ci_doctrine
en mysql:
id: integer not nul autoincrement
username: varchar(255) not null
password: varchar(255) not null
first_name: varchar(255) not null
last_name: varchar(255) not null
en postgres es:
id: integer not null
username: character varying(255)
password: character varying(255)
first_name: character varying(255)
last_name: character varying(255)
Hice la prueba con ambos motores de base de datos y obtengo la misma respuesta.
Intente poniendo mi user y pass de los gestores y nada.
¿Que hago mal?