Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for 1.5 release #390

Merged
merged 10 commits into from
Apr 26, 2024
Merged

Prepare for 1.5 release #390

merged 10 commits into from
Apr 26, 2024

Conversation

mShan0
Copy link
Contributor

@mShan0 mShan0 commented Apr 26, 2024

No description provided.

mShan0 and others added 10 commits March 14, 2024 16:24
* Fix param format bug

* fix null case

---------

Co-authored-by: mShan0 <[email protected]>
If we don't use this `where` this query returns the tables from all the schemas and not just the schema we are looking for.  Filter applied in the `left join` does not have the expected result in this scenario.

Just run the query below and you see what I mean
```sql
SELECT
                        TABLE_NAME,
                        i.TABLE_SCHEMA,
                        TABLE_TYPE,
                        CAST(ep.value AS VARCHAR) AS COMMENT
                    FROM INFORMATION_SCHEMA.TABLES i
                    LEFT JOIN sys.tables t ON t.name = i.TABLE_NAME
                    LEFT JOIN sys.extended_properties ep ON t.object_id = ep.major_id
                    AND ((ep.name = 'MS_DESCRIPTION' AND ep.minor_id = 0) OR ep.value IS NULL)
                    AND i.TABLE_SCHEMA = 'my_dev_schema'
```

If we have in the same database one schema the has the django_migrations but we are then running our application, that does not have migrations, against a different schema, this bit here breaks the application. The function has_table() will return True, but it should return False, because out schema does NOT have the table.
@mShan0 mShan0 merged commit 9f0f562 into master Apr 26, 2024
38 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants