Open zroytman opened 9 months ago
I have a similar problem. We have a list of SQL scripts that have already been executed in our development environment and we want to start using schema change, but we want to record the current scripts in the CHANGE_HISTORY table without executing them.
Hi, We ran into similar use case and followed these steps, using some python scripts.
hashlib.sha224(content.encode('utf-8')).hexdigest()
Insert the entries generated from the above step into the schema_change_history table
now apply schema change with dry-run: false and you should not see script changes getting applied Thanks
@kotha Thanks. That is exactly what I did ;-)
What are you trying to accomplish? I'm using the SchemaChange as part of our Azure DevOps pipeline. As we already have many DB objects deployed, I'm looking for the way to load the CHANGE_HISTORY table for the first time without deploying (compiling) the objects in the DB.
What options have you tried so far ? I've tried to run the SchemaChange in Dry Mode and expected to get exactly what I need, means updating the CHANGE_HISTORY table without compiling the DB objects themselves. In real, Dry Mode doesn't compile the objects (which is great) but doesn't update the CHANGE_HISTORY table too (which is bad for me).
So is there any way to run the SchemaChange in the mode in need? Any additional flag I missed?
Thanks.