drajer-health / eCRNow

Repository for eCRNow app.
Apache License 2.0
41 stars 55 forks source link

kar_execution_state(nc_id uuid) throws error while SQL migrations with SQL server #805

Open khushlo opened 1 month ago

khushlo commented 1 month ago

While running ecrnow app, first it executes migrations which returns below error :

Error executing DDL "create table kar_execution_state (id binary(255) not null, action_status TEXT, hs_fhir_server_url TEXT not null, kar_unique_id TEXT not null, nc_id uuid not null, nc_fk binary(255), primary key (id))" via JDBC Statement

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Column, parameter, or variable #5: Cannot find data type uuid.

image

problem is with nc_id which eventually trying to create uuid column which is not supported by SQL server. However whithout specified 'id' column converted to binary(255) type in sql server (as per above error).

khushlo commented 1 month ago

Additionally we are getting couple of more migration errors for index creation :

Details :

  1. Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Column 'notified_resource_id' in table 'ph_messages' is of a type that is invalid for use as a key column in an index.

  2. Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Column 'kar_unique_id' in table 'ph_messages' is of a type that is invalid for use as a key column in an index.

khushlo commented 1 month ago

@nbashyam Can you please check check this, we are facing this with our Paragon EHR where we uses SQL Server