This is sadly for backwards compatibility: before the change for precision editing, the precision value was 0. To avoid having a breaking change where users have to specify '7' for precision for all their datetime2 fields, we emit 7 as the default value for 0.
We can't do it another way, as we don't know if a '0' for precision in the project file is there because the user has specified that or because it's an older project and it's a leftover from before the change, so we can't correct it when loading the project, and we can't say "just refresh from the DB" as the problem is only occurring in DDL SQL scripts, which are used in model first....
If you want to work around it, you have to use a custom template for this. Create a copy of \Frameworks\DDL SQL\Templates\SqlServerSpecific\FieldCreationInclude.lpt and change line 57. Then create a new templatebindings file in the designer using the template viewer and bind this copy of the template to the ID SD_DDLSQL_FieldCreationInclude, like so:
(increased precedence here from 10 to 11 so it overrules the existing one and used dummy filenames)
<?xml version="1.0" encoding="utf-8"?>
<templateBindings name="SD.TemplateBindings.SqlServerSpecific.DDLSQL.Copy" description="SQL Server specific template bindings for DDL SQL generation"
precedenceLevel="11" databaseDriverID="2D18D138-1DD2-467E-86CC-4838250611AE" xmlns="http://sd/llblgen/pro/templateBindingsDefinition.xsd">
<supportedPlatforms>
<platform name="RDBMS"/>
</supportedPlatforms>
<supportedFrameworks>
<framework name="DDL SQL" />
</supportedFrameworks>
<language name="SQL">
<templateBinding templateID="SD_DDLSQL_FieldCreationInclude" filename="SqlServerSpecific\FieldCreationIncludeCopy.lpt" templateLanguage="C#" includeOnly="true" />
</language>
</templateBindings>
And make sure the templatebindings file is reachable by the designer, so in the folder specified in the additionaltemplates folder setting in the project settings. It should then be picked up when you generate DDL SQL the next time.
If you can think of a simpler solution, please let me know