littleK0i / SnowDDL

Declarative database change management tool for Snowflake
Apache License 2.0
104 stars 27 forks source link

Adding ability for schema level sandbox param to override database sandbox param #143

Closed TedCha closed 2 weeks ago

TedCha commented 2 weeks ago

Discussed here: https://github.com/littleK0i/SnowDDL/issues/140#issuecomment-2463005245

Enables user to define is_sandbox in schema level params.yaml which will override is_sandbox in database level params.yaml

TedCha commented 2 weeks ago

Sorry, Python short circuiting tripped me up. Just tested locally and looks like everything is good to go 👍

littleK0i commented 2 weeks ago

Implemented it slightly differently, in one line: https://github.com/littleK0i/SnowDDL/commit/abbe07fb4acf7f77dae2496113bfdc40966998ff#diff-949bf933547dd3b9a0b2c4d790fe4868fa216eafd19c95ffc02b85081c0fc524R96

PEP8 requires None checks to be coded as var is None instead of var == None, since a custom object can technically be equal to None. https://peps.python.org/pep-0008/#programming-recommendations

I'll close this specific PR, but feature should be available since 0.35.0.

TedCha commented 2 weeks ago

That looks much cleaner, thanks for the fix!