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

bug: postgres: unexpected number of rows: 1 #48

Open
afifurrohman-id opened this issue Aug 11, 2024 · 6 comments
Open

bug: postgres: unexpected number of rows: 1 #48

afifurrohman-id opened this issue Aug 11, 2024 · 6 comments

Comments

@afifurrohman-id
Copy link

afifurrohman-id commented Aug 11, 2024

  • Db url: postgres://postgres:foo@localhost:5432/postgres?search_path=public&sslmode=disable
  • Cmd: entimport -dsn
  • Postgres Server: 16.3 (Docker)
  • SQL:
CREATE TABLE IF NOT EXISTS foo(
    ID UUID UNIQUE DEFAULT GEN_RANDOM_UUID(),
    name VARCHAR(255) NOT NULL,
    PRIMARY KEY(ID)
);
@agulencina96
Copy link

I have the same issue

@antham
Copy link

antham commented Sep 28, 2024

Have a look here ent/ent#3752

@afifurrohman-id
Copy link
Author

Have a look here ent/ent#3752

It didn't help, i have latest atlas:

atlas version v0.27.1-a360fd8-canary
and postgres 16.3.x

still raise same error

@antham
Copy link

antham commented Oct 2, 2024

Have you read that ent/ent#3752 (comment) ? The pbm is with PG 16 this query
SELECT setting FROM pg_settings WHERE name IN ('lc_collate', 'lc_ctype', 'server_version_num', 'crdb_version') ORDER BY name DESC; doesn't work anymore.

What I did is downgrade PG in 15.X through docker and I imported my schema.

@afifurrohman-id
Copy link
Author

What I did is downgrade PG in 15.X through docker and I imported my schema.

We can't do this right now, because we have different teams that manage postgres and used by another app.

@antham
Copy link

antham commented Oct 2, 2024

We can't do this right now, because we have different teams that manage postgres and used by another app.

In my case I did that for an initial import, so I did that in docker just to run a one shot entimport

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

3 participants