Open lacy-alistair-bbd opened 1 year ago
Types for postgres can be found: https://github.com/SI-Gen/jportal2/blob/develop/src/main/java/bbd/jportal2/generators/PostgresDDL.java#L349
Does the documentation need to be updated to identify which types can be used with which databases?
Edit: I did check the types on the template. We're just not aware if UID is missing as an oversight or there is no intention to support it
Documentation probably needs to be update. PR's welcome.
As for why now UID is supported in postgres i see no reason why it cant be supported. @dieterrosch your thoughts?
It can be added.It hasn't been used thus far because historically using UUID's as PK's for database were a bad idea - for 99% of use cases sequences are/were better.
In terms of the String thing - that is very strange - we use that template in tons places and it works. @lacy-alistair-bbd What version of the template are you using? (Put another way, please send me the JPortal command line you're using?).
The example it's self was more indicative, Our use case it not necessarily as the PK, but more a tracking identifier that gets pushed to a downstream system
Our command line it:
docker run --rm -v .:/serviceroot ghcr.io/si-gen/jportal2:1.10.5 \ --inputdir=/serviceroot/src/sql/si \ --builtin-generator PostgresDDL:/serviceroot/src/sql/ddl \ --template-generator SQLAlchemy:/serviceroot/src/app/data \ --download-template "SQLAlchemy:https://github.com/SI-Gen/jportal2-generator-vanguard-sqlalchemy/archive/refs/tags/2.5.zip|stripBaseDir"
Hi team
Using the UID column type for PostgreSQL generates the following:
SI
DDL
The generated Python code also needs editing as it does not import the relevant String type