add graph model and graphs_instances relation table