Skip to content

Commit

Permalink
SQLite does not support bigints (#717)
Browse files Browse the repository at this point in the history
* SQLite does not support bigints

* Update data type support
  • Loading branch information
lohart13 authored Mar 19, 2024
1 parent 27f44fb commit ef10d90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/models/data-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ A ❌ means the dialect does not support that DataType.
| `INTEGER(1)` || `INTEGER(1)` | `INTEGER(1)` ||||||
| `INTEGER.UNSIGNED` | `BIGINT` | `INTEGER UNSIGNED` | `INTEGER UNSIGNED` | `BIGINT` | `INTEGER` | `INTEGER` | `BIGINT` | `BIGINT` |
| `INTEGER.ZEROFILL` || `INTEGER ZEROFILL` | `INTEGER ZEROFILL` ||||||
| [`BIGINT`](pathname:///api/v7/classes/_sequelize_core.index.unknown.BIGINT.html) | `BIGINT` | [`BIGINT`](https://mariadb.com/kb/en/bigint/) | `BIGINT` | `BIGINT` | `INTEGER` | `INTEGER` | `BIGINT` | `BIGINT` |
| [`BIGINT`](pathname:///api/v7/classes/_sequelize_core.index.unknown.BIGINT.html) | `BIGINT` | [`BIGINT`](https://mariadb.com/kb/en/bigint/) | `BIGINT` | `BIGINT` | | `INTEGER` | `BIGINT` | `BIGINT` |
| `BIGINT(1)` || `BIGINT(1)` | `BIGINT(1)` ||||||
| `BIGINT.UNSIGNED` || `BIGINT UNSIGNED` | `BIGINT UNSIGNED` || `INTEGER` | `INTEGER` |||
| `BIGINT.UNSIGNED` || `BIGINT UNSIGNED` | `BIGINT UNSIGNED` || | `INTEGER` |||
| `BIGINT.ZEROFILL` || `BIGINT ZEROFILL` | `BIGINT ZEROFILL` ||||||

</DialectTableFilter>
Expand Down
3 changes: 2 additions & 1 deletion docs/other-topics/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ Other changes:
- `DataTypes.BIGINT` and `DataTypes.DECIMAL` values are always returned as strings instead of JS numbers.
- `DataTypes.CHAR.BINARY` and `DataTypes.STRING.BINARY` now mean "chars with a binary collation" and throw in dialects that do not support collations.
- **SQLite**: All Data Types are now named after one of the [6 strict data types](https://www.sqlite.org/stricttables.html).
- **SQLite**: `DataTypes.CHAR` has been removed, as SQLite doesn't provide a fixed-length `CHAR` type.
- **SQLite**: `DataTypes.CHAR` has been removed, as SQLite doesn't provide a fixed-length `CHAR` type.
- **SQLite**: `DataTypes.BIGINT` has been removed as the `sqlite3` package loses precision for bigints because it parses them as JS numbers.
- **SQL Server**: `DataTypes.UUID` now maps to `UNIQUEIDENTIFIER` instead of `CHAR(36)`.

### Cannot define values of `DataTypes.ENUM` separately
Expand Down

0 comments on commit ef10d90

Please sign in to comment.