Skip to content

Commit

Permalink
fix: snapshots failing because of wrong mysql colum quoting
Browse files Browse the repository at this point in the history
  • Loading branch information
outinim committed Apr 4, 2024
1 parent 53e6c19 commit e1aa8c2
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{#
Add new columns to the table if applicable
#}
{% macro create_columns(relation, columns) %}
{{ adapter.dispatch('create_columns', 'dbt')(relation, columns) }}
{% endmacro %}

{% macro default__create_columns(relation, columns) %}
{% for column in columns %}
{% call statement() %}
alter table {{ relation }} add column {{ column.quoted() }} {{ column.data_type }};
{% endcall %}
{% endfor %}
{% endmacro %}

0 comments on commit e1aa8c2

Please sign in to comment.