(The) Worm Has Turned

What does the idiom “(The) Worm Has Turned” mean?

Definition:

The situation has been reversed.

For example:

“Barbara has always bossed everyone around, but today in the meeting Caitlin stood up to her. The worm has turned! “

Notes:

“Worm” here originally meant “dragon.”