When previewing the SQL for a table create statement it is nicely formatted with carriage returns and indention
CREATE TABLE [dbo].[e5]
(
[e5_id] Uniqueidentifier NOT NULL,
[e6_id] Uniqueidentifier NOT NULL,
[e1_id] Uniqueidentifier NOT NULL,
[e9_id] Uniqueidentifier NOT NULL
)
When you view the DDL for a relationship, you just get one long line of text.
ALTER TABLE [dbo].[e5] ADD CONSTRAINT [e6_to_e5] FOREIGN KEY ([e6_id]) REFERENCES [dbo].[e6] ([e6_id]) ON DELETE CASCADE
I see that you have a gray vertical line down the right hand side of the preview dialog at 80 characters. It would be nice if you could automatically wrap text to that maybe with some extra spaces on the next line… The above statement becomes
ALTER TABLE [dbo].[e5] ADD CONSTRAINT [e6_to_e5] FOREIGN KEY ([e6_id]) REFERENCES
[dbo].[e6] ([e6_id]) ON DELETE CASCADE
It would be even nicer if you could format the statement a little better. Something like
ALTER TABLE [dbo].[e5] ADD CONSTRAINT [e6_to_e5]
FOREIGN KEY ([e6_id]) REFERENCES [dbo].[e6] ([e6_id])
ON DELETE CASCADE
Of course, we would want that wrapped text to carry through to the SQL that gets generated to the script, but that should be easy enough. I’m sure there will be those people who don’t want the text to wrap. They can un-check the new box labelled “Wrap text” that you add beside the magnifying glass on the SQL Preview dialog.
I suppose there is a way to modify the SQL genrator that I haven’t found and played with yet such that I can format the SQL that is generated to meet my internal coding standards.