can't get EnumScript() to generate constraints
问题 I'm trying to get programmatically what I can get manually from SSMS using Tasks > Generate Scripts The code below works fine, EXCEPT it doesn't generate any constraints. I don't get any ALTER TABLE [foo] ADD CONSTRAINT ... ON DELETE CASCADE etc etc. I've tried a lot of combinations of Dri options and on different databases as well. I'm stumped. Thanks for insight! Scripter scrp = new Scripter(srv) { Options = { ScriptDrops = false, WithDependencies = false, Indexes = true, Triggers = false,