If you bought the digital-version, you will find a PS4-version sitting on your PS4-store for 10 bucks.
If you bought the disk, I think you will need the code in the game-cover - to download a different upgrade version - while keeping the PS3-version inside your PS4.
PSN download-codes usually only work once and transfer the product to your purchase history, just as you bought it.
On the upgrades games in PSN-store, only Assasins Creed showed itself, because that's the only one I had bought digitally. :-/