Closed yassinrais closed 3 years ago
Oh , my bad it was
PRIMARY KEY
Instead of only
PRIMARY
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'] ,'')
],
I will check it soon and put a resolution.
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
.
Table company
After runing migration![image](https://user-images.githubusercontent.com/25354731/115937611-b135a800-a498-11eb-956d-d13f49318ca6.png)