File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
dbt/include/sqlserver/macros/adapters Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ select @drop_remaining_indexes_last = (
134
134
135
135
{{ log (" Creating clustered index..." ) }}
136
136
137
- {% set idx_name = this . table + ' __clustered_index_on_' + columns| join (' _' ) %}
137
+ {% set idx_name = " clustered_ " + local_md5( columns | join (" _ " ) ) %}
138
138
139
139
if not exists (select *
140
140
from sys .indexes with (nolock )
159
159
{{ log (" Creating nonclustered index..." ) }}
160
160
161
161
{% if includes - %}
162
- {% set idx_name = this .table + ' __index_on_' + columns|join (' _' )|replace (" " , " _" ) + ' _includes_' + includes|join (' _' )|replace (" " , " _" ) %}
162
+ {% set idx_name = (
163
+ " nonclustered_"
164
+ + local_md5(columns | join (" _" ))
165
+ + " _incl_"
166
+ + local_md5(includes | join (" _" ))
167
+ ) %}
163
168
{% else - %}
164
- {% set idx_name = this . table + ' __index_on_' + columns| join (' _' )| replace ( " " , " _ " ) %}
169
+ {% set idx_name = " nonclustered_ " + local_md5( columns | join (" _ " ) ) %}
165
170
{% endif %}
166
171
167
172
if not exists (select *
You can’t perform that action at this time.
0 commit comments