Nowe posty

xx Problem ze sterownikami. (5)
2024-04-13, 21:25:16
xx Instalacja xfce4 (2)
2024-04-13, 16:20:17
xx Serie kompilacji bez instalacji dla “emerge” w Gentoo (2)
2024-04-08, 18:40:04
xx Plasma 6 w Neonie ssie trochę mniej ... (17)
2024-04-05, 10:03:46
xx Problem z Linux Lite po instalacji (3)
2024-04-03, 14:23:40
xx Jak właczyć num locka przy starcie systemu debian 12? (12)
2024-04-02, 17:43:54
xx Brak dźwieku w systemie. (5)
2024-04-02, 16:13:41
xx Dystrybucja pod HP Omen (7)
2024-03-29, 11:33:05
xx [Poradnik] Wyszukiwanie Sterowników (2)
2024-03-27, 21:08:23
xx Ile pingwinów? (1)
2024-03-27, 08:59:24

Autor Wątek: Symphony baza w YAML  (Przeczytany 5825 razy)

  • Gość
Symphony baza w YAML
« dnia: 2010-03-18, 15:20:41 »
Próbowałem w YAML stworzyć sobie bazę:

Jednak przy generowaniu wyświetliło mnie sie:

Cytuj
tomasz@tomasz-laptop:~/project/symfony$ ./symfony doctrine:build-schema
>> doctrine  generating yaml schema from database

                                           
  No models generated from your databases
# config/schema.yml

propel:
   articles_category:
     actAs: { Timestampable: ~ }
     columns:
      id:            ~
      name:          { type: varchar(255), required, index: unique }
      description:   { type: varchar(255) }
      parent:        { type: integer }
      visible:       { type: boolean }
      creation_date: { type: timestamp }
      moderator:     { type: integer }
      group:         { type: integer, required }

   articles_entries:
     actAs: { Timestampable: ~ }
     columns:
      id:            ~
      description:   { type: string(255), required, index: unique }
      content:       { type: string (65535) }
      category:      { type: integer }
      visible:       { type: boolean }
      creation_date: { type: timestamp }
      author:        { type: integer }
     
   users:
     actAs: { Timestampable: ~ }
     columns:
      id:            ~
      login:         { type: varchar (32) }
      password:      { type: varchar (32) }
      name:          { type: varchar (255) }
      last_name:     { type: varchar (255) }
      creation_date  { type: timestamp }
      blocked:       { type: boolean }
Co robię nie tak?

ZipoKing

  • Gość
Symphony baza w YAML
« Odpowiedź #1 dnia: 2010-03-18, 15:39:27 »
1. Plik ze schematem bazy danych powinien być w config/doctrine/schema.yml a nie config/schema.yml (tej lokalizacji używa Propel, a widzę że używasz Doctrine)
2. Pierwszy wiersz - nie jestem pewny czy to ma jakieś znaczenie, ale zamień "propel" na "doctrine"

  • Gość
Symphony baza w YAML
« Odpowiedź #2 dnia: 2010-03-18, 15:56:48 »
Hmm... nadal nie działa

# config/doctrine/schema.yml

doctrine:
   articles_category:
     actAs: { Timestampable: ~ }
     columns:
      id:            ~
      name:          { type: varchar(255), required, index: unique }
      description:   { type: varchar(255) }
      parent:        { type: integer }
      visible:       { type: boolean }
      creation_date: { type: timestamp }
      moderator:     { type: integer }
      group:         { type: integer, required }

   articles_entries:
     actAs: { Timestampable: ~ }
     columns:
      id:            ~
      description:   { type: string(255), required, index: unique }
      content:       { type: string (65535) }
      category:      { type: integer }
      visible:       { type: boolean }
      creation_date: { type: timestamp }
      author:        { type: integer }
     
   users:
     actAs: { Timestampable: ~ }
     columns:
      id:            ~
      login:         { type: varchar (32) }
      password:      { type: varchar (32) }
      name:          { type: varchar (255) }
      last_name:     { type: varchar (255) }
      creation_date  { type: timestamp }
      blocked:       { type: boolean }

  • Gość
Symphony baza w YAML
« Odpowiedź #3 dnia: 2010-03-18, 16:02:37 »
Zdaje mnie się też żę generator pliku nie widzi, bo nawet wpisałem zupełnie błędne dane a on nic nadal to samo. Jednak zdaje mnie się, że plik schema.yml mam teraz w dobrej lokalizacji?? mam go w /home/tomasz/project/symfony/config/doctrine/schema.yml