Closed awaescher closed 1 year ago
The install script is correct. It is identical to https://github.com/aspnet/SignalR-SqlServer/blob/dev/src/Microsoft.AspNetCore.SignalR.SqlServer/install.sql except for a comment and an error message string.
There is only one schema version, and there are no current plans or need to have a version 2 of the schema, just as there was no v2 schema in the legacy aspnet backplane upon which this project is based.
The main part of the schema install script is creating additional tables up to @MESSAGE_TABLE_COUNT, which is needed any time the table count increases, not only when the schema version were to hypothetically rev.
A setting to disable auto install could be added, yes.
A setting to disable auto install could be added, yes.
Would be awesome. I patched SqlInstaller.Install()
to just return a completed task and scripted the tables upfront and everything works as expected.
Awesome, thanks a thousand times for this. I'll be reporting back to the team 👏
I was just about to try this backplane, thanks a lot for building it.
However, I cannot make use of the backplane's
EnsureSqlServerConnection()
as I don't have the permissions to alter the database in production systems from my app - this is done with migrations upfront.So I came across the
install.sql
script which I could add to my migrations. Perfect. I also added the permissions like this:But the next issue is this:
So it says the current version is 1 and it's about to install version 1 and I guess the
IF
s are not meant the way they are implemented:Right now, it's checking if
1 <= 1
in the firstIF
which is true for my case. The nextIF
checks if1=1
which is also true and leads to schema installation. Shouldn't it be one singleIF
that checks if the current schema is older than the target schema only?This leads to two questions: