Skip to content

Commit

Permalink
Add: note re: gin index for jsonb
Browse files Browse the repository at this point in the history
  • Loading branch information
benkoshy committed Apr 30, 2021
1 parent 76f8aec commit 0c9eeca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ an "image" attachment on a `photos` table this would be an `image_data` column:

```
$ rails generate migration add_image_data_to_photos image_data:text # or :jsonb
# if jsonb consider adding a [gin index](https://www.postgresql.org/docs/current/datatype-json.html#JSON-INDEXING) for fast key-value pair searchability
```

Now create an uploader class (which you can put in `app/uploaders`) and
Expand Down
1 change: 1 addition & 0 deletions doc/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ end
<!--Rails-->
```
$ rails generate migration add_image_data_to_photos image_data:text # or image_data:jsonb
# if jsonb consider adding a [gin index](https://www.postgresql.org/docs/current/datatype-json.html#JSON-INDEXING) for fast key-value pair searchability
```
<!--END_DOCUSAURUS_CODE_TABS-->

Expand Down

0 comments on commit 0c9eeca

Please sign in to comment.