June 10, 2025 at 2:24 pm
Hi,
I have a situation in one of the applications I am working on where prior to going live in production, we are going to migrate data from legacy systems over the period of few weeks. And at the same time, there will be activity from users in this production application. i.e, new records generated and existing (migrated ) records updated from user activity.
I want to be able to identify what records have been migrated from legacy systems, what records are newly created by user activity in this application and what records were initially migrated but later on updated from user activity in this application.
I am exploring options to implement this . Any ideas are appreciated.
Thanks,
June 11, 2025 at 3:10 pm
Thanks for posting your issue and hopefully someone will answer soon.
This is an automated bump to increase visibility of your question.
June 12, 2025 at 5:37 am
You can add metadata columns like source, created by, created at, and updated at to your tables. Mark migrated data with 'legacy' and user-generated data with 'user'. Use triggers to update metadata when users modify records. This helps track the origin and any changes easily.
June 12, 2025 at 2:06 pm
I agree. It would have to be an added column on a given table that states the source of the data. You could create a user-defined-type using ENUM for the two values you need. Not sure about using triggers for it, but sure, you could. I'd probably make the default 'User' and then plan to always update the value for the migration to 'Migration' (or whatever two values you decide on).
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply