Here's a great melodic minor scale pattern you can use over G7 or Db7 as well as D minor chords. Any dominant chord can pair with two corresponding melodic minor scales. Example an E7 goes well with A melodic minor but also with F melodic minor for a more altered dominant sound.
Some ideas about how to use the altered dominant or relative melodic minor scale when resolving to a major chord from the dominant V chord. The V chord does not have to be altered in order to use this sound. You can assert the sound over a regular G7 during your solo if it's done tastefully. I encourage you to come up with your own combinations and ways to use this scale by finding patterns that appeal to you. experiment with many different fingerings that take you different places on the neck and that also yield new patterns and combinations.
Using half-whole dominant diminished scales and diminished arpeggios is a lot of fun over the bridge to rhythm changes. Here are some ideas to use to help get the sound under your fingers.