Replies: 1 comment
-
Hi, @champin4 - this shouldn't be a problem, since the internal migration has a more specific log category than the "user migrations": So you should be able to override the log levels on your logging provider using standard loglevel overrides, in appSettings.json, or wherever you configure the log levels, as specified here: So, to differ the log levels for the internal and user grate migrations, you could do e.g. {
"Logging": {
"LogLevel": {
"Default": "Information",
"Grate": "Information",
"Grate.Migration.Internal": "Error"
}
}
} to avoid logging anything less urgent than |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to not log the Internal Migrations process, ideally when running programmatically? Or is there something I'm not setting up correctly that it's not recognizing it's on the latest version on subsequent runs? It's quite a lot of log for nothing to be happening, and there is a need for us to review them frequently. It's also confusing at first because it starts off with just regular Grate.Migration information messages, and then goes to the .Internal stuff, and then back to just plain .Migration.
Additionally it also seems to expect all of the standard folders, which feels like the Internal migrations would not be using (and could be added internally if they're ever needed).
Code and log below for reference in case I've got something off.
Code:
Log
info: grate.SqlServer.Migration.SqlServerDatabase[0]
Initializing connections.
info: Grate.Migration[0]
Running grate v1.8.0 (build date 07/25/2024 03:13:24) against localhost,1433 - myApplication.
info: Grate.Migration[0]
Looking in C:\Cloud\myCompany-myApplication\src\Migrations\myApplication.MigrationTool\Scripts for scripts to run.
info: Grate.Migration[0]
================================================================================
info: Grate.Migration[0]
Setup, Backup, Create/Restore/Drop
info: Grate.Migration[0]
================================================================================
info: Grate.Migration[0]
================================================================================
info: Grate.Migration[0]
Grate Structure
info: Grate.Migration[0]
================================================================================
info: Grate.Migration.Internal[0]
Initializing connections.
info: Grate.Migration.Internal[0]
Running grate v1.8.0 (build date 07/25/2024 03:13:24) against localhost,1433 - myApplication.
info: Grate.Migration.Internal[0]
Looking in C:\Users\aUser\AppData\Local\Temp\tmpie41cq.tmp for scripts to run.
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Setup, Backup, Create/Restore/Drop
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Grate Structure
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Versioning
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Migrating myApplication from version 1.8.0 to 1.8.0.
info: Grate.Migration.Internal[0]
Versioning myApplication database with version 1.8.0.
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Migration Scripts
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Skipping 'BeforeMigration', beforeMigration does not exist.
info: Grate.Migration.Internal[0]
Skipping 'AlterDatabase', alterDatabase does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Run Before Update', runBeforeUp does not exist.
info: Grate.Migration.Internal[0]
info: Grate.Migration.Internal[0]
Looking for Update scripts in "C:\Users\aUser\AppData\Local\Temp\tmpie41cq.tmp\up". These should be one time only scripts.
info: Grate.Migration.Internal[0]
--------------------------------------------------------------------------------
info: Grate.Migration.Internal[0]
No sql run, either an empty folder, or all files run against destination previously.
info: Grate.Migration.Internal[0]
--------------------------------------------------------------------------------
info: Grate.Migration.Internal[0]
info: Grate.Migration.Internal[0]
Skipping 'Run First After Update', runFirstAfterUp does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Functions', functions does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Views', views does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Stored Procedures', sprocs does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Triggers', triggers does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Indexes', indexes does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Run after Other Anytime Scripts', runAfterOtherAnyTimeScripts does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Permissions', permissions does not exist.
info: Grate.Migration.Internal[0]
Skipping 'AfterMigration', afterMigration does not exist.
info: Grate.Migration.Internal[0]
grate v1.8.0 (build date 07/25/2024 03:13:24) has grated your database (myApplication)! You are now at version 1.8.0. All changes and backups can be found at "C:\Cloud\myCompany-myApplication\src\Migrations\myApplication.MigrationTool\bin\local\Debug\net8.0\output\grate-internal-bootstrap\migrations\myApplication\localhost_1433\2024-10-31T00_47_01.1576903-04_00".
info: Grate.Migration.Internal[0]
info: Grate.Migration.Internal[0]
Initializing connections.
info: Grate.Migration.Internal[0]
Running grate v1.8.0 (build date 07/25/2024 03:13:24) against localhost,1433 - myApplication.
info: Grate.Migration.Internal[0]
Looking in C:\Users\aUser\AppData\Local\Temp\tmp0hwerf.tmp for scripts to run.
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Setup, Backup, Create/Restore/Drop
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Grate Structure
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Versioning
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Migrating myApplication from version 1.8.0 to 1.8.0.
info: Grate.Migration.Internal[0]
Versioning myApplication database with version 1.8.0.
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Migration Scripts
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Skipping 'BeforeMigration', beforeMigration does not exist.
info: Grate.Migration.Internal[0]
Skipping 'AlterDatabase', alterDatabase does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Run Before Update', runBeforeUp does not exist.
info: Grate.Migration.Internal[0]
info: Grate.Migration.Internal[0]
Looking for Update scripts in "C:\Users\aUser\AppData\Local\Temp\tmp0hwerf.tmp\up". These should be one time only scripts.
info: Grate.Migration.Internal[0]
--------------------------------------------------------------------------------
info: Grate.Migration.Internal[0]
No sql run, either an empty folder, or all files run against destination previously.
info: Grate.Migration.Internal[0]
--------------------------------------------------------------------------------
info: Grate.Migration.Internal[0]
info: Grate.Migration.Internal[0]
Skipping 'Run First After Update', runFirstAfterUp does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Functions', functions does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Views', views does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Stored Procedures', sprocs does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Triggers', triggers does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Indexes', indexes does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Run after Other Anytime Scripts', runAfterOtherAnyTimeScripts does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Permissions', permissions does not exist.
info: Grate.Migration.Internal[0]
Skipping 'AfterMigration', afterMigration does not exist.
info: Grate.Migration.Internal[0]
grate v1.8.0 (build date 07/25/2024 03:13:24) has grated your database (myApplication)! You are now at version 1.8.0. All changes and backups can be found at "C:\Cloud\myCompany-myApplication\src\Migrations\myApplication.MigrationTool\bin\local\Debug\net8.0\output\grate-internal\migrations\myApplication\localhost_1433\2024-10-31T00_47_01.4410274-04_00".
info: Grate.Migration.Internal[0]
info: Grate.Migration.Internal[0]
Initializing connections.
info: Grate.Migration.Internal[0]
Running grate v1.8.0 (build date 07/25/2024 03:13:24) against localhost,1433 - myApplication.
info: Grate.Migration.Internal[0]
Looking in C:\Users\aUser\AppData\Local\Temp\tmpuas3ml.tmp for scripts to run.
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Setup, Backup, Create/Restore/Drop
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Grate Structure
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Versioning
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Migrating myApplication from version 1.8.0 to 1.8.0.
info: Grate.Migration.Internal[0]
Versioning myApplication database with version 1.8.0.
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Migration Scripts
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Skipping 'BeforeMigration', beforeMigration does not exist.
info: Grate.Migration.Internal[0]
Skipping 'AlterDatabase', alterDatabase does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Run Before Update', runBeforeUp does not exist.
info: Grate.Migration.Internal[0]
info: Grate.Migration.Internal[0]
Looking for Update scripts in "C:\Users\aUser\AppData\Local\Temp\tmpuas3ml.tmp\up". These should be one time only scripts.
info: Grate.Migration.Internal[0]
--------------------------------------------------------------------------------
info: Grate.Migration.Internal[0]
No sql run, either an empty folder, or all files run against destination previously.
info: Grate.Migration.Internal[0]
--------------------------------------------------------------------------------
info: Grate.Migration.Internal[0]
info: Grate.Migration.Internal[0]
Skipping 'Run First After Update', runFirstAfterUp does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Functions', functions does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Views', views does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Stored Procedures', sprocs does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Triggers', triggers does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Indexes', indexes does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Run after Other Anytime Scripts', runAfterOtherAnyTimeScripts does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Permissions', permissions does not exist.
info: Grate.Migration.Internal[0]
Skipping 'AfterMigration', afterMigration does not exist.
info: Grate.Migration.Internal[0]
grate v1.8.0 (build date 07/25/2024 03:13:24) has grated your database (myApplication)! You are now at version 1.8.0. All changes and backups can be found at "C:\Cloud\myCompany-myApplication\src\Migrations\myApplication.MigrationTool\bin\local\Debug\net8.0\output\grate-internal-bootstrap\migrations\myApplication\localhost_1433\2024-10-31T00_47_01.5177067-04_00".
info: Grate.Migration.Internal[0]
info: Grate.Migration.Internal[0]
Initializing connections.
info: Grate.Migration.Internal[0]
Running grate v1.8.0 (build date 07/25/2024 03:13:24) against localhost,1433 - myApplication.
info: Grate.Migration.Internal[0]
Looking in C:\Users\aUser\AppData\Local\Temp\tmpycxpj0.tmp for scripts to run.
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Setup, Backup, Create/Restore/Drop
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Grate Structure
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Versioning
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Migrating myApplication from version 1.8.0 to 1.8.0.
info: Grate.Migration.Internal[0]
Versioning myApplication database with version 1.8.0.
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Migration Scripts
info: Grate.Migration.Internal[0]
================================================================================
info: Grate.Migration.Internal[0]
Skipping 'BeforeMigration', beforeMigration does not exist.
info: Grate.Migration.Internal[0]
Skipping 'AlterDatabase', alterDatabase does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Run Before Update', runBeforeUp does not exist.
info: Grate.Migration.Internal[0]
info: Grate.Migration.Internal[0]
Looking for Update scripts in "C:\Users\aUser\AppData\Local\Temp\tmpycxpj0.tmp\up". These should be one time only scripts.
info: Grate.Migration.Internal[0]
--------------------------------------------------------------------------------
info: Grate.Migration.Internal[0]
No sql run, either an empty folder, or all files run against destination previously.
info: Grate.Migration.Internal[0]
--------------------------------------------------------------------------------
info: Grate.Migration.Internal[0]
info: Grate.Migration.Internal[0]
Skipping 'Run First After Update', runFirstAfterUp does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Functions', functions does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Views', views does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Stored Procedures', sprocs does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Triggers', triggers does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Indexes', indexes does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Run after Other Anytime Scripts', runAfterOtherAnyTimeScripts does not exist.
info: Grate.Migration.Internal[0]
Skipping 'Permissions', permissions does not exist.
info: Grate.Migration.Internal[0]
Skipping 'AfterMigration', afterMigration does not exist.
info: Grate.Migration.Internal[0]
grate v1.8.0 (build date 07/25/2024 03:13:24) has grated your database (myApplication)! You are now at version 1.8.0. All changes and backups can be found at "C:\Cloud\myCompany-myApplication\src\Migrations\myApplication.MigrationTool\bin\local\Debug\net8.0\output\grate-internal\migrations\myApplication\localhost_1433\2024-10-31T00_47_01.5992227-04_00".
info: Grate.Migration.Internal[0]
info: Grate.Migration[0]
================================================================================
info: Grate.Migration[0]
Versioning
info: Grate.Migration[0]
================================================================================
info: Grate.Migration[0]
Migrating myApplication from version 1.8.0 to 1.8.0.
info: grate.SqlServer.Migration.SqlServerDatabase[0]
Versioning myApplication database with version 1.8.0.
info: Grate.Migration[0]
================================================================================
info: Grate.Migration[0]
Migration Scripts
info: Grate.Migration[0]
================================================================================
info: Grate.Migration[0]
info: Grate.Migration[0]
Looking for BeforeMigration scripts in "C:\Cloud\myCompany-myApplication\src\Migrations\myApplication.MigrationTool\Scripts\beforeMigration". These scripts will run every time.
info: Grate.Migration[0]
--------------------------------------------------------------------------------
info: grate.Migration.DbMigrator[0]
Running 'myApplication_schema.sql'.
info: Grate.Migration[0]
--------------------------------------------------------------------------------
info: Grate.Migration[0]
info: Grate.Migration[0]
Skipping 'AlterDatabase', alterDatabase does not exist.
info: Grate.Migration[0]
Skipping 'Run Before Update', runBeforeUp does not exist.
info: Grate.Migration[0]
Skipping 'Update', up does not exist.
info: Grate.Migration[0]
Skipping 'Run First After Update', runFirstAfterUp does not exist.
info: Grate.Migration[0]
Skipping 'Functions', functions does not exist.
info: Grate.Migration[0]
Skipping 'Views', views does not exist.
info: Grate.Migration[0]
Skipping 'Stored Procedures', sprocs does not exist.
info: Grate.Migration[0]
Skipping 'Triggers', triggers does not exist.
info: Grate.Migration[0]
Skipping 'Indexes', indexes does not exist.
info: Grate.Migration[0]
Skipping 'Run after Other Anytime Scripts', runAfterOtherAnyTimeScripts does not exist.
info: Grate.Migration[0]
Skipping 'Permissions', permissions does not exist.
info: Grate.Migration[0]
Skipping 'AfterMigration', afterMigration does not exist.
info: Grate.Migration[0]
grate v1.8.0 (build date 07/25/2024 03:13:24) has grated your database (myApplication)! You are now at version 1.8.0. All changes and backups can be found at "C:\Cloud\myCompany-myApplication\src\Migrations\myApplication.MigrationTool\bin\local\Debug\net8.0\output\migrations\myApplication\localhost_1433\2024-10-31T00_47_00.2617925-04_00".
info: Grate.Migration[0]
C:\Cloud\myCompany-myApplication\src\Migrations\myApplication.MigrationTool\bin\local\Debug\net8.0\myApplication.MigrationTool.exe (process 736) exited with code 0 (0x0).
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
Press any key to close this window . . .
Thanks for any help, trying to pitch this as our successor to roundhouse for our next project!
Beta Was this translation helpful? Give feedback.
All reactions