add it to use transaction in sqlite
delete all flows when port is down