Last active
February 10, 2020 13:24
-
-
Save ricardodantas/3c6efa939551c9fdf0c1fe591f3f5f69 to your computer and use it in GitHub Desktop.
Using uuid postgresql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- https://stackoverflow.com/questions/20342717/postgresql-change-column-type-from-int-to-uuid | |
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; | |
ALTER TABLE tableA ALTER COLUMN colA SET DATA TYPE UUID USING (uuid_generate_v4()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment