Skip to content

Don't index all fields by default#108

Closed
tasn wants to merge 1 commit intofastapi:mainfrom
tasn:patch-1
Closed

Don't index all fields by default#108
tasn wants to merge 1 commit intofastapi:mainfrom
tasn:patch-1

Conversation

@tasn
Copy link

@tasn tasn commented Sep 21, 2021

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
Copy link

uolot commented Sep 21, 2021

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

@tasn
Copy link
Author

tasn commented Sep 21, 2021

Duplicate.

@tasn tasn closed this Sep 21, 2021
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