[PGsql] Index should be primary key , instead of Normal Index
yassinrais opened this issue · 4 comments
yassinrais commented
yassinrais commented
Oh , my bad it was
PRIMARY KEY
Instead of only
PRIMARY
yassinrais commented
But the migration generator , does not put any option of indexing key
he just let it empty like
'indexes' => [
new Index('pk_company_id_0', ['id'], ''),
new Index('unq_company_country_id', ['country_id', 'name'] ,'')
],
BeMySlaveDarlin commented
I will check it soon and put a resolution.
BeMySlaveDarlin commented
First of all, pgsql adapter was hard locked for index definition creation. Using pg you should not have 'indexes' block. But you got that definition array just because your adapter in config file was Pascal case, so adapter check failed and indexes block was generated.
Made adapter check case insensitive and fixed indexes type definition.
Another point - in 'indexes' definition you cant have Primary index. That index is defined via Column definition by using option 'primary' => true
.