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

Sequencing in Postgres hits required Budibase validation when using it as a primary display column #15443

Open
1 task done
ConorWebb96 opened this issue Jan 27, 2025 · 1 comment
Labels
bb-data-ui bug Something isn't working customer Created by Linear-GitHub Sync env - production Bug found in production externaldb Relating to datasource plus premium-enterprise Feature for Enterprise plan validation Relating to validation/verification/constraints

Comments

@ConorWebb96
Copy link
Contributor

ConorWebb96 commented Jan 27, 2025

Checklist

  • I have searched budibase discussions and github issues to check if my issue already exists

Hosting

  • Self
    • Method: docker compose
    • Budibase Version: 3.3.2
    • App Version: 3.3.2

Describe the bug
If the sequence is set to the primary display column after the table has been fetched, it will prompt with the "cannot be left blank" error message and prevent the row from being saved. It won't throw this error if it's already set to the display column after fetching the tables.

CREATE SEQUENCE public.test_sequence
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;

ALTER SEQUENCE public.test_table OWNER TO postgres;

CREATE TABLE public.test_table (
    sequence_id character varying(10) DEFAULT ('ID-'::text || to_char(nextval('public.test_sequence'::regclass), 'FM000000'::text)) NOT NULL,
title character varying(500) NOT NULL,
description text
);

To Reproduce
Steps to reproduce the behavior:

  1. Import the sequence and table into a Postgres database
  2. Fetch the database in Budibase
  3. Set the sequence_id field to the primary display.
  4. Try and create a new record.
  5. See it will say that this field can't be left blank

Expected behavior
Regardless of when this is set to the primary display column because it is a sequence column, the required tag should be ignored, and the row should be created as the database generates the value for that field.

Screenshots
Image

@ConorWebb96 ConorWebb96 added bb-data-ui bug Something isn't working customer Created by Linear-GitHub Sync env - production Bug found in production externaldb Relating to datasource plus premium-enterprise Feature for Enterprise plan validation Relating to validation/verification/constraints labels Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bb-data-ui bug Something isn't working customer Created by Linear-GitHub Sync env - production Bug found in production externaldb Relating to datasource plus premium-enterprise Feature for Enterprise plan validation Relating to validation/verification/constraints
Projects
None yet
Development

No branches or pull requests

1 participant