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

Error at schema initialization (PostgresException: '42704: type public.stream_message[] does not exist) #314

Closed
mjamro opened this issue Feb 16, 2024 · 1 comment · Fixed by #340

Comments

@mjamro
Copy link

mjamro commented Feb 16, 2024

Describe the bug

Schema classes for Postgres, Redis and SqlServer do this:

var names = Assembly.GetManifestResourceNames().Where(x => x.EndsWith(".sql")).OrderBy(x => x);

When you have invariant globalization enabled in csproj

  <PropertyGroup>
    <InvariantGlobalization>true</InvariantGlobalization>
  </PropertyGroup>

it breaks initialization of Eventous as the order of scripts after OrdeBy is different and _Schema.sql lands at the end.

 "AppendEvents.sql",
 "CheckStream.sql",
 "ReadAllForwards.sql",
 "ReadStreamForwards.sql",
 "ReadStreamSub.sql"
 "_Schema.sql",

This results in Npgsql.PostgresException: '42704: type public.stream_message[] does not exist' exception.

To Reproduce

Set <InvariantGlobalization>true</InvariantGlobalization> in csproj. Run the booking demo app.

Expected behavior

Initialization works

@fbjerggaard
Copy link
Contributor

Would probably be a pretty easy fix by prefixing the files with a number for sorting. This would probably be a good idea to do for sqlserver as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants