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