我正在尝试使用 node-pg-migrate
并运行迁移以在我的节点项目中创建表。
当我运行迁移时,我得到函数 uuid_generate_v4() 不存在。
我确实检查了我的扩展并且 uuid-ossp 可用。
extname | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition
-----------+----------+--------------+----------------+------------+-----------+--------------
plpgsql | 10 | 11 | f | 1.0 | |
uuid-ossp | 16384 | 2200 | t | 1.1 | |
(2 rows)
我希望我的迁移能够运行,但它失败了。我在 Mac 上使用 Postgres 11。
Postgres 从这里安装 - https://postgresapp.com/
最佳答案
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
关于postgresql - 函数 uuid_generate_v4() 不存在 postgres 11,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56411055/