Open dawoe opened 8 years ago
I'm not sure we have that information to hand. Currently all I believe we have to go on is the umbracoMigration table. Anything else in managed in MigrationBase classes.
Any thoughts on how we'd achieve this? :)
I think this would be good starting points to see how the core handles it: https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/src/Umbraco.Core/Persistence/Migrations/MigrationRunner.cs
Are you going to codegarden ? We can discuss it there ?
Dave
@dawoe afraid I'm not. I'm using MigrationBase & MigrationRunner but we'd have to add additional code to a MigrationBase class in order to log what SQL was executed per version?
Will try to hack something together after codegarden
Strange that you had to hack something to see what is executed. Our sql statements get logged just out of the box.
Okay, sounds like a plan. I was running against a v7.3.0 site so maybe something changed? I wasn't aware the data was being logged anywhere, where should I be looking?
Would be interesting to see what you come back with.
We are running 7.3.8 now and everytime we run a migration the sql statements are logged in the Umbraco log files as DEBUG line.
Maybe you have set your log4net to INFO and that's why you don't see them. Or it is added in a version after 7.3.0
@dawoe I've started with a fresh database and ran our first run of Migrations with log4net set to DEBUG and I see what you mean about migrations logging.
I've only had a short look over the log data and I couldn't see anything that specifically ties the Migration version with the log data. I can see the migration class name but not a version at this point.
Would be super awesome if you could click on a migration and see which SQL statements have run as part of the migration.