Skip to content

Commit

Permalink
docs: fix schema data types mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
clefelhocz2 committed Mar 19, 2024
1 parent 5b6123e commit c4f551d
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions docs-site/content/docs/the-app/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ These fields are ignored if you provide them in your migration command. In addit
For schema data types, you can use the following mapping to understand the schema:

```rust
("uuid", "uuid_null"),
("uuid!", "uuid"),
("uuid^", "uuid_uniq"),
("uuid", "uuid_uniq"),
("uuid_col", "uuid_null"),
("uuid_col!", "uuid"),
("string", "string_null"),
("string!", "string"),
("string^", "string_uniq"),
Expand All @@ -111,10 +111,10 @@ For schema data types, you can use the following mapping to understand the schem
("decimal!", "decimal"),
("decimal_len", "decimal_len_null"),
("decimal_len!", "decimal_len"),
("boolean", "boolean_null"),
("boolean!", "boolean"),
("tstz", "timestamptz_null"),
("tstz!", "timestamptz"),
("bool", "boolean_null"),
("bool!", "boolean"),
("tstz", "timestamp_with_time_zone_null"),
("tstz!", "timestamp_with_time_zone"),
("date", "date_null"),
("date!", "date"),
("ts", "timestamp_null"),
Expand All @@ -125,7 +125,6 @@ For schema data types, you can use the following mapping to understand the schem
("jsonb!", "json_binary"),
```


Using `user:references` uses the special `references` type, which will create a relationship between a `post` and a `user`, adding a `user_id` reference field to the `posts` table.

You can generate an empty model:
Expand Down

0 comments on commit c4f551d

Please sign in to comment.