Extracting app creation sql to db namespace.