Skip to content

Commit b118945

Browse files
authored
Merge pull request #563 from axellpadilla/drop_schema_name_fix
fix to make drop_schema_name usable and test pass
2 parents 7b5183e + 402eb0a commit b118945

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

dbt/include/sqlserver/macros/adapters/schema.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
{% endmacro %}
3838

3939
{% macro sqlserver__drop_schema_named(schema_name) %}
40-
{% set schema_relation = api.Relation.create(schema=schema_name) %}
40+
{% set schema_relation = api.Relation.create(schema=schema_name, database=target.database) %}
4141
{{ adapter.drop_schema(schema_relation) }}
4242
{% endmacro %}
4343

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import pytest
2-
31
from dbt.tests.adapter.relations.test_changing_relation_type import BaseChangeRelationTypeValidator
42
from dbt.tests.adapter.relations.test_dropping_schema_named import BaseDropSchemaNamed
53

@@ -8,10 +6,5 @@ class TestChangeRelationTypeValidator(BaseChangeRelationTypeValidator):
86
pass
97

108

11-
@pytest.mark.xfail(reason="""
12-
Test fails as its not passing Use[] properly.
13-
`Use[None]` is called, should be `User[TestDB]`
14-
Unclear why the macro doens't pass it properly.
15-
""")
169
class TestDropSchemaNamed(BaseDropSchemaNamed):
1710
pass

0 commit comments

Comments
 (0)