Ninja-Squad / DbSetup

An API for populating a database in unit tests
http://dbsetup.ninja-squad.com/
212 stars 34 forks source link

Error : type "double" does not exist (with postgresql) #74

Closed orousseil closed 2 years ago

orousseil commented 2 years ago

When trying to create database with DDL in postgresql, then sql create table command fail with error :

org.postgresql.util.PSQLException: ERROR: type "double" does not exist

In java the column is of type Double

In postgresql double numeric type is labed DOUBLE PRECISION not DOUBLE

cf https://www.postgresql.org/docs/devel/datatype-numeric.html

see also : https://stackoverflow.com/questions/52827853/type-double-does-not-exist-in-postgresql

jnizet commented 2 years ago

OK, but how is it related to DbSetup?

orousseil commented 2 years ago

You're right, it's Hibernate role to inititialise the database from ddl not yours. Maybe I forgot the to configure the dialect. I close this unrelevant issue