UNPKG

4.29 kBMarkdownView Raw
1# Changelog
2
3## [2.1.2](https://github.com/RobinBuschmann/sequelize-typescript/compare/v2.1.1...v2.1.2) (2022-01-03)
4
5### Bug Fixes
6
7* use custom decorator on column have a property descriptor ([#1070](https://github.com/RobinBuschmann/sequelize-typescript/issues/1070)) ([7ce03de](https://github.com/RobinBuschmann/sequelize-typescript/commit/7ce03de76b465172994f41a55058ea49f3ce27c3))
8* **validators:** allow any values for isIn/notIn ([#1124](https://github.com/RobinBuschmann/sequelize-typescript/issues/1124)) ([d25b392](https://github.com/RobinBuschmann/sequelize-typescript/commit/d25b39282d2a49e4e5cf286100344e7d1fda3c84))
9
10## [2.1.1](https://github.com/RobinBuschmann/sequelize-typescript/compare/v2.1.0...v2.1.1) (2021-10-10)
11
12### Bug Fixes
13
14* **model:** adjust init method to recently introduced sequelize type changes ([b60c011](https://github.com/RobinBuschmann/sequelize-typescript/commit/b60c011be2e971e56cb783d4ade994965faab916))
15
16## [2.1.0](https://github.com/RobinBuschmann/sequelize-typescript/compare/v2.0.0-beta.1...v2.1.0) (2021-02-14)
17
18Initial release with Changelog.
19
20### Bug Fixes
21
22* allow $set null (remove association) ([#774](https://github.com/RobinBuschmann/sequelize-typescript/issues/774)) ([ffe1c78](https://github.com/RobinBuschmann/sequelize-typescript/commit/ffe1c78df73df7f287b8ce345d6ac0df30283723))
23* model associations methods to reflect sequelize v6 ([#888](https://github.com/RobinBuschmann/sequelize-typescript/issues/888)) ([6b1e3ff](https://github.com/RobinBuschmann/sequelize-typescript/commit/6b1e3fffd974f087be2e18258306f81860923ba3))
24* typeof Model errors by using typeof Model generics ([#900](https://github.com/RobinBuschmann/sequelize-typescript/issues/900)) ([b865840](https://github.com/RobinBuschmann/sequelize-typescript/commit/b8658404f12e7a44893c9b8652714473bb25f495))
25
26### Features
27
28* infer bigint data type ([#893](https://github.com/RobinBuschmann/sequelize-typescript/issues/893)) ([7c467d4](https://github.com/RobinBuschmann/sequelize-typescript/commit/7c467d404a200b3153cc7aa2605d1e542bef3da9))
29
30## Older versions
31
32### ⚠️ sequelize@5
33
34`sequelize@5` requires `sequelize-typescript@1`. See
35[documentation](https://github.com/RobinBuschmann/sequelize-typescript/tree/1.0.0) for version `1.0`.
36
37```sh
38npm install sequelize-typescript@1.0
39```
40
41#### V5 Model definition
42
43```typescript
44import { Table, Model } from 'sequelize-typescript'
45
46@Table
47class Person extends Model<Person> {}
48```
49
50### ⚠️ sequelize@4
51
52`sequelize@4` requires `sequelize-typescript@0.6`. See
53[documentation](https://github.com/RobinBuschmann/sequelize-typescript/tree/0.6.X) for version `0.6`.
54
55```sh
56npm install sequelize-typescript@0.6
57```
58
59### Upgrade to `sequelize-typescript@2`
60
61* `sequelize-typescript@2` only works with `sequelize@6.2>=`.
62 For `sequelize@5` use `sequelize-typescript@1.0`.
63
64#### Breaking Changes
65
66* All breaking changes of `sequelize@6` are also valid for `sequelize-typescript@2`.
67 See [Upgrade to v6](https://sequelize.org/master/manual/upgrade-to-v6.html) for details.
68* `@types/bluebird` is no longer needed, `sequelize@6` removed usage of `bluebird`
69* Sequelize v6.2 introduced additional model attributes typings, which affects how the model is defined.
70* See below comparison between V5 and V6 model definition to show how to upgrade models.
71* For more details, see [sequelize typescript docs](https://sequelize.org/master/manual/typescript.html).
72
73### Upgrade to `sequelize-typescript@1`
74
75`sequelize-typescript@1` only works with `sequelize@5>=`.
76For `sequelize@4` & `sequelize@3` use `sequelize-typescript@0.6`.
77
78#### Breaking Changes @5
79
80All breaking changes of `sequelize@5` are also valid for `sequelize-typescript@1`.
81See [Upgrade to v5](https://sequelize.org/v5/manual/upgrade-to-v5.html) for details.
82
83#### Official Sequelize Typings
84
85sequelize-typescript now uses the official typings bundled with sequelize
86(See [this](https://sequelize.org/v5/manual/upgrade-to-v5.html#typescript-support)).
87Please note the following details:
88
89* Most of the sequelize-typescript interfaces of the previous version are replaced by the official ones
90* `@types/sequelize` is no longer used
91* `@types/bluebird` is no longer an explicit dependency
92* The official typings are less strict than the former sequelize-typescript ones