Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [Symfony] schema.xml Postgres i atrybut 'unique'
blackroger
post
Post #1





Grupa: Zarejestrowani
Postów: 176
Pomógł: 0
Dołączył: 8.11.2008

Ostrzeżenie: (0%)
-----


Witam. Mam problem z ustawieniem flagi UNIQUE na kolumnę... kod się wykonuje ale ale flaga nie jest ustawiona.
  1. <table name="categories" phpName="Categories">
  2. <column name="cat_id" type="integer" required="true"
  3. autoIncrement="true" primaryKey="true" />
  4. <column name="name" type="varchar" required="true" />
  5. <column name="about" type="longvarchar" />
  6. <column name="unique_cat_id" type="integer" index="unique" required="true" />
  7. </table>


Ten post edytował blackroger 23.10.2009, 12:26:00
Go to the top of the page
+Quote Post
l3l0
post
Post #2





Grupa: Zarejestrowani
Postów: 94
Pomógł: 16
Dołączył: 24.07.2009
Skąd: Gdańsk

Ostrzeżenie: (0%)
-----


Witam.

Z tego co pamiętam to unique w xml definowało się jakoś tak (dla propela):

  1. ...
  2. <column name="cat_id" type="integer" />
  3. <unique name="cat_id_key">
  4. <unique-column name="cat_id" />
  5. </unique>
  6. ...


Ten post edytował l3l0 23.10.2009, 13:07:16
Go to the top of the page
+Quote Post
blackroger
post
Post #3





Grupa: Zarejestrowani
Postów: 176
Pomógł: 0
Dołączył: 8.11.2008

Ostrzeżenie: (0%)
-----


Dzięki wielkie....nie wiem czy bym to tak szybko znalazł...
Go to the top of the page
+Quote Post
Crozin
post
Post #4





Grupa: Zarejestrowani
Postów: 6 476
Pomógł: 1306
Dołączył: 6.08.2006
Skąd: Kraków

Ostrzeżenie: (0%)
-----


Z Propela już jakiś czas nie korzystam, ale IIRC indeks unikalny deklaruje się poprzez unique: true, a nie index: unique
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 19.08.2025 - 09:22