Welcome Guest, Not a member yet? Register   Sign In
How can I remove a unique constraint on a field when performing a down migration?
#3

You could execute some SQL to delete it directly:


PHP Code:
public function down()
{
  
    $this
->db->simpleQuery("ALTER TABLE pages DROP INDEX slug");




(the unique index will have a name - if you don't know what it is, you can get it with this: SHOW INDEX FROM pagesWink
Reply


Messages In This Thread
RE: How can I remove a unique constraint on a field when performing a down migration? - by daveontheciforum - 12-12-2020, 10:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB