Interesting concept for a defense.

Quirky that the advertisement showing for me is a Water Damage Repair company

I agree that there needs to be multiple ways of flooding or it will not work. A commando raid of adventurers captures the one or two breach points spoils it. The other problem is water flows down so the sea will have to be up above the level of the city ground floor for this to work. Very hard to regulate how much how fast that water pours in .

If there is a reasonable way of emptying the water back out this works as a defensive scheme very well and not just a last desperate drown then all before they get killed sort of thing.

BOB