Added all functions and tables to sql file