Saving sink_id to the database