write DB schema into a sql file (create it if not exists)