Trying to remove unique constraint from Propel database column...

U01QPS50XPX
U01QPS50XPX Posts: 2 🧑🏻‍🚀 - Cadet
edited June 2023 in Propel ORM

Hi all!
I’m trying to remove unique constraint from Propel database column. Since Spryker merges the Propel schema into a single schema file, so every unique constraint from the Spryker core schema will end up in the final Propel schema. However, the unique constraint for email in the table spy_customer should be removed from the final Propel schema for my case.
Anybody knows how to remove it?

Tagged:

Comments

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,075 ⚖️ - Guardians (admin)

    Hey, there is no “clean” way. But combining the field with the id-field removed the uniqueness at least logical:

    <unique name="spy_customer-email">
        <!-- This is the only way to remove uniqueness from email column -->
        <unique-column name="id_customer"/>
    </unique>
    
  • U01QPS50XPX
    U01QPS50XPX Posts: 2 🧑🏻‍🚀 - Cadet

    thanks for the answer