Trouble Dropping Unique Constraint

前端 未结 1 1980
眼角桃花
眼角桃花 2021-01-18 05:23

In PG:

I made a user table that includes unique emails, but later decided that emails should not be unique. I pushed changes to make my email field non-unique (I use

相关标签:
1条回答
  • 2021-01-18 05:43

    I bet that "unique_users_email" is actually the name of a unique index rather than a constraint. Try:

    DROP INDEX "unique_users_email";

    Recent versions of psql should tell you the difference between a unique index and a unique constraint when looking at the \d description of a table.

    0 讨论(0)
提交回复
热议问题