Files
hibernate-demo/enums/output/05-hbm2ddl-update.txt
T

25 lines
1.2 KiB
Plaintext

# Adding CANCELLED, then starting release 2 with hbm2ddl=update: is the schema fixed?
# Hibernate ORM 7.4.17.Final, H2 2.4.240 and PostgreSQL 18.6, JDK 25
== H2
-- ORDINAL
after update: column type: TINYINT
after update: check: "STATUS" BETWEEN 0 AND 2
write CANCELLED : FAILS Check constraint violation: "CONSTRAINT_8: "; SQL statement:
-- STRING
after update: column type: ENUM
write CANCELLED : FAILS Value not permitted for column "('NEW', 'PAID', 'SHIPPED')": "CANCELLED"; SQL statement:
== PostgreSQL 18
-- ORDINAL
after update: column type: smallint
after update: check: CHECK (((status >= 0) AND (status <= 2)))
write CANCELLED : FAILS ERROR: new row for relation "orders" violates check constraint "orders_status_check"
-- STRING
after update: column type: character varying(255)
after update: check: CHECK (((status)::text = ANY ((ARRAY['NEW'::character varying, 'PAID'::character varying, 'SHIPPED'::character varying])::text[])))
write CANCELLED : FAILS ERROR: new row for relation "orders" violates check constraint "orders_status_check"
-- NAMED_ENUM
after update: column type: statusv1
write CANCELLED : FAILS ERROR: invalid input value for enum statusv1: "CANCELLED"