The problem was not running the entire script with DBeaver. You have to click the "Execute SQL Script" (The third form the top) button. The "Execute SQL Query" (top button) is not sufficient enough.