creation and deletion database tables on switching theme