Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用postgres数据库床建一个项目失败 #25

Closed
nekorrrr opened this issue Mar 8, 2024 · 4 comments
Closed

使用postgres数据库床建一个项目失败 #25

nekorrrr opened this issue Mar 8, 2024 · 4 comments

Comments

@nekorrrr
Copy link

nekorrrr commented Mar 8, 2024

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior, if applicable:

  1. The code is

  2. The error is
    有可能是数据库字段类型的错误?

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.
image
image

Environments (please complete the following information):

  • OS: windows
  • sponge version v1.6.2

More description
Add any other context about the problem here.
如图所示

@zhufuyi
Copy link
Owner

zhufuyi commented Mar 9, 2024

这是在postgresql创建的表

create table users
(
    id          bigint not null,
    user_id character varying(50) not null,
    user_name character varying(100)
);

用这个表可以生成代码,没有出现错误,你导出sql看看是什么样的。

@nekorrrr
Copy link
Author

nekorrrr commented Mar 9, 2024

这是在postgresql创建的表

create table users
(
    id          bigint not null,
    user_id character varying(50) not null,
    user_name character varying(100)
);

用这个表可以生成代码,没有出现错误,你导出sql看看是什么样的。

-- Table: public.users

-- DROP TABLE IF EXISTS public.users;

CREATE TABLE IF NOT EXISTS public.users
(
    id bigint NOT NULL,
    user_id character varying COLLATE pg_catalog."default" NOT NULL,
    user_name character varying COLLATE pg_catalog."default",
    CONSTRAINT users_pkey PRIMARY KEY (id, user_id)
)

TABLESPACE pg_default;

ALTER TABLE IF EXISTS public.users
    OWNER to postgres;
···
这是用pgadmin导出的DDL

@zhufuyi
Copy link
Owner

zhufuyi commented Mar 10, 2024

这个bug在 v1.6.3 版本已修复,可以执行 sponge upgrade 升级到最新版本。

@nekorrrr
Copy link
Author

这个bug在 v1.6.3 版本已修复,可以执行 sponge upgrade 升级到最新版本。

经测试问题已经解决,感谢您的回答!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants