I have a post with only this
[gallery id="file"] in text editor but in visual, there appears a gallery. I was moving these posts and updating gallery ids automatically, but these posts don't have any gallery image ids to move or update. I checked the database, I found [gallery id="file"] there in post_content too.
How does this magic work? I need the ids.