fully updated sql file

created active_order table, altered other tables