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: failed to execute the auto-generated function after setting the column as PK #346

Closed
wingkwong opened this issue Jul 14, 2021 · 1 comment
Labels
🐛 Type: Bug Something is broken or incorrect unexpectedly.

Comments

@wingkwong
Copy link
Member

wingkwong commented Jul 14, 2021

Goal: change default id column to uuid (auto-generated)

Steps To Reproduce

  1. create a table
  2. create a column "uuid" with auto-generate function, e.g. md5(random()::text || clock_timestamp()::text)::uuid. Make it as NN & PK
  3. delete default existing "id" column
  4. create a new record -> no auto generate value
  5. It prompts something like column with PK cannot be empty (bc no value begin auto-generated)

however,

  1. create a table
  2. create a column "uuid" with auto-generate function, e.g. md5(random()::text || clock_timestamp()::text)::uuid. NOT make it as NN & PK
  3. delete default existing "id" column
  4. create a new record -> able to auto generate value

Expected behavior
The value can be auto-generated.

Node: v12.22.1
Arch: x64
Platform: linux
Docker: true
Database: pg
ProjectOnRootDB: false
RootDB: pg
PackageVersion: 0.10.3

@pranavxc pranavxc added the 🐛 Type: Bug Something is broken or incorrect unexpectedly. label Jul 16, 2021
@pranavxc
Copy link
Member

fixed in 0.10.5

akbarpasha pushed a commit to akbarpasha/nocodb that referenced this issue Nov 15, 2021
Ignore primary key validation if default value present

closes nocodb#346

Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Type: Bug Something is broken or incorrect unexpectedly.
Projects
None yet
Development

No branches or pull requests

2 participants