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

TJDB: When user bulk uploads CSV, server should verify data for all primary keys are made mandatory except serial data type #9064

Closed
akshaysasidrn opened this issue Mar 12, 2024 · 0 comments · Fixed by #9503

Comments

@akshaysasidrn
Copy link
Collaborator

akshaysasidrn commented Mar 12, 2024

Is your proposal related to a problem?

The current behaviour supports skipping primary keys, which are always of serial data type. These are auto-generated by the database. Going forward, serial data type is optional and a user can chose whatever type and name they prefer for the primary key.

Describe the solution you'd like

We should make csv upload behaviour such that:

  1. Throw error 'Primary key required for column' if data is missing and the column is not of serial data type
  2. For serial data type column, regardless of whether data exists or not within the csv the value should always be autogenerated on the insert

This is currently handled here: https://github.com/ToolJet/ToolJet/blob/develop/server/src/services/tooljet_db_bulk_upload.service.ts

@akshaysasidrn akshaysasidrn added this to the Database 1.1 milestone Mar 12, 2024
@akshaysasidrn akshaysasidrn changed the title TJDB: When user bulk uploads CSV, server should verify all primary keys are made mandatory except serial data type TJDB: When user bulk uploads CSV, server should verify data for all primary keys are made mandatory except serial data type Mar 12, 2024
@parthy007 parthy007 self-assigned this Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment