Welcome Guest, Not a member yet? Register   Sign In
Database Migration confusion
#5

You would need to disable foreign keys before the migration, then enable them after. Unfortunately, that's a hole in our current db layer (though I should be creating some methods for that in the next couple of weeks).

For mysql, you can use:

Code:
$db->query("SET FOREIGN_KEY_CHECKS=0;");

// do your migrations

$db->query("SET FOREIGN_KEY_CHECKS=1;");
Reply


Messages In This Thread
Database Migration confusion - by MeltedRolo - 04-24-2019, 06:33 AM
RE: Database Migration confusion - by php_rocs - 04-24-2019, 08:04 AM
RE: Database Migration confusion - by kilishan - 04-24-2019, 08:36 AM
RE: Database Migration confusion - by MeltedRolo - 04-24-2019, 09:57 AM
RE: Database Migration confusion - by kilishan - 04-24-2019, 10:36 AM
RE: Database Migration confusion - by MeltedRolo - 04-25-2019, 06:30 AM
RE: Database Migration confusion - by MeltedRolo - 04-25-2019, 08:54 AM
RE: Database Migration confusion - by kilishan - 06-07-2019, 07:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB