FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Don't index all fields by default by tasn · Pull Request #108 · fastapi/sqlmodel · GitHub

Repository navigation

Don't index all fields by default - #108

Closed
tasn wants to merge 1 commit into
fastapi:mainfrom
tasn:patch-1
Closed

tasn wants to merge 1 commit into
fastapi:mainfrom
tasn:patch-1

Conversation

tasn commented Sep 21, 2021

Copy link
Copy Markdown

The code was setting an index on every field by default.
This meant that a simple model like:

class Foo(SQLModel, table=True):
    a: str
    b: int
    c: str

Would have indices for all fields. This is wrong, the default should be to not create an index.

The code was setting an index on every field by default.
This meant that a simple model like:

```python
class Foo(SQLModel, table=True):
    a: str
    b: int
    c: str
```
Would have indices for all fields. This is wrong, the default should be to not create an index.

uolot commented Sep 21, 2021 •
edited
Loading

Copy link
Copy Markdown

There's already an open PR that fixes this #11

tasn commented Sep 21, 2021

Copy link
Copy Markdown
Author

Duplicate.

tasn closed this Sep 21, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL