-
Notifications
You must be signed in to change notification settings - Fork 49
Description
Describe the bug
Using grate.sqlserver, HasRun() check is fetching scripts from RoundhousE.GrateScriptsRun which is wrong when trying to run my scripts (xxxx.NewAddressColumns.sql). My scripts already ran and are in RoundhousE.ScriptsRun table.
To Reproduce
Have an existing RoundhousE tables such as "RoundhousE.ScriptsRun". Specify the "RoundhousE" schema in start-up.
Expected behavior
The existing RoundhousE script to not run again.
Desktop (please complete the following information):
- OS: Windows 11
- Version: 1.7.4
Context
This in AnsiSqlDatabase
class, this is the cache:
private async Task<IDictionary<string, string>> GetScriptsRunCache() => _scriptsRunCache ??= await GetAllScriptsRun();
_scriptsRunCache
is shared across all migration scripts (Grate scripts and user scripts) which is wrong. user scripts should either "refresh" the cache using the correct table "ScriptsRun" or separate instance of the AnsiSqlDatabase
class, or another property to store this (or something else)