impossible de generer la base de données
bonjour, je développe ma première application sous symfony2 et j'ai un souci lors de la génération des table via doctrine.
j'ai ce message d'erreur :
Code:
1 2 3 4 5 6 7 8 9 10 11
|
ebola@eboStation:~/workspace/www/lillelemidi$ php app/console doctrine:schema:update --dump-sql
[Doctrine\DBAL\Schema\SchemaException]
The table with name 'lillelemidi.quartier' already exists.
doctrine:schema:update [--complete] [--dump-sql] [--force] [--em[="..."]] |
j'ai touvé ce post sur le forum officiel : http://forum.symfony-project.org/viewtopic.php?f=23&t=45508&p=138767&hilit=[Doctrine\DBAL\Schema\SchemaException]#p138767
a priori ça viendrait des mes yml
y aurait-il quelques utilisateurs avancés pour valider mon travail ? :p
voici mon schéma de bdd :
https://docs.google.com/file/d/0B859...it?usp=sharing
voici les entité en yml :
- Quartier.orm.yml
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
Cnam\LillelemidiBundle\Entity\Quartier:
type: entity
table: quartier
id:
id:
type: integer
generator:
strategy: AUTO
fields:
nom:
type: string
length: 30
unique: true
oneToMany:
restaurant:
targetEntity: Restaurant
mappedBy: quartier
manyToOne:
ville:
targetEntity: Ville
inversedBy: quartier
joinColumn:
name: ville_id
referencedColumnName: id |
- Restaurant.orm.yml
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
Cnam\LillelemidiBundle\Entity\Restaurant:
type: entity
table: restaurant
id:
id:
type: integer
generator:
strategy: AUTO
fields:
photoUrl:
type: string
length: 100
nullable: true
adresse:
type: string
length: 70
email:
type: string
length: 55
unique: true
nom:
type: string
length: 55
prenom:
type: string
length: 55
noTel:
type: string
length: 10
mdp:
type: string
length: 20
created_at:
type: datetime
lastLogin:
type: datetime
nullable: true
oneToMany:
favori:
targetEntity: Favori
mappedBy: restaurant
jourOuvre:
targetEntity: JourOuvre
mappedBy: restaurant
manyToOne:
quartier:
targetEntity: Quartier
inversedBy: restaurant
joinColumn:
name: quartier_id
referencedColumnName: id
lifecycleCallbacks:
prePersist: [ setCreatedAtValue ] |
- Ville.orm.yml
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
Cnam\LillelemidiBundle\Entity\Ville:
type: entity
table: ville
id:
id:
type: integer
generator:
strategy: AUTO
fields:
nom:
type: string
length: 30
unique: true
codePostal:
type: integer
length: 5
unique: true
oneToMany:
quartier:
targetEntity: Quartier
mappedBy: ville |
je suis a votre dipo. pour toute info supplémentaire,
merci d'avance