bytebase / bytebase

The GitHub/GitLab for database DevSecOps. World's most advanced database DevSecOps solution for Developer, Security, DBA and Platform Engineering teams.
https://www.bytebase.com
Other
11.37k stars 733 forks source link

ERROR: function uuid_generate_v4() does not exist (SQLSTATE 42883) #10513

Open dfang opened 9 months ago

dfang commented 9 months ago

Provide the Bytebase version you are using

v2.13.0

Describe the bug

创建schema迁移工单时,报错: ERROR: function uuid_generate_v4() does not exist (SQLSTATE 42883)

Steps to reproduce

CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE PUBLIC.bargains (
  id uuid NOT NULL DEFAULT uuid_generate_v4 (),
  CONSTRAINT bargains_pkey PRIMARY KEY (ID)
) TABLESPACE pg_default;

Expected behavior

如psql控制台下一样 可以正常执行

Provide the database you are using

PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit

Provide the version control system you are using

git

Additional context

No response

d-bytebase commented 9 months ago

Does public.uuid_generate_v4() work?

dfang commented 9 months ago

nope,

ERROR: function public.uuid_generate_v4() does not exist (SQLSTATE 42883)