Fixed #24017 -- Add python_2_unicode_compatible in db/migrations

Actually since the ticket doesn't really provide any additional context and the test is rather self-explanatory, I would omit a doc string. Also it would be nice to test a more complex graph with some nodes and edges. Also, I didn't mean to suggest that tests for the other classes aren't required.