twenty/packages/twenty-server
Pacifique LINJANJA ff77a4ee21
Feat/migrate password reset token to app token table (#5051)
# This PR

- Fix #5021 
- Migrates `passwordResetToken` and `passwordResetTokenExpiresAt` fields
from `core.users` to `core.appToken`
- Marks those fields as `deprecated` so we can remove them later if we
are happy with the transition -- I took this decision on my own,
@FellipeMTX let me know what you think about it, we can also remove them
straight away if you think it's better
- Fixed the `database:migration` script from the `twenty-server` to:
```json
    "database:migrate": {
      "executor": "nx:run-commands",
      "dependsOn": ["build"], // added this line
      "options": {
        "cwd": "packages/twenty-server",
        "commands": [
          "nx typeorm -- migration:run -d src/database/typeorm/metadata/metadata.datasource",
          "nx typeorm -- migration:run -d src/database/typeorm/core/core.datasource"
        ],
        "parallel": false
      }
    },
```
The migration script wasn't running because the builds were not executed
- [x] Added unit tests for the token.service file's changes

Looking forward to hearing feedback from you

cc: @charlesBochet

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-05-06 15:30:03 +02:00
..
@types Compile with swc on twenty-server (#4863) 2024-04-14 09:09:51 +02:00
patches Fix yoga patch user id cache (#5285) 2024-05-03 18:47:31 +02:00
scripts Uniformize datasources (#5196) 2024-04-27 11:43:44 +02:00
src Feat/migrate password reset token to app token table (#5051) 2024-05-06 15:30:03 +02:00
test chore: use Nx affected tasks in CI (#5110) 2024-04-30 16:28:25 +02:00
.env.example GH-3546 Recaptcha on login form (#4626) 2024-04-25 23:52:28 +02:00
.env.test File token chores (#4664) 2024-03-26 13:42:09 +01:00
.eslintrc.cjs fix: fix storybook:build memory allocation error in CI (#5284) 2024-05-03 19:19:21 +02:00
.gitignore feat: workspace:health nullable fix (#3882) 2024-02-08 18:22:29 +01:00
.prettierignore Migrate to a monorepo structure (#2909) 2023-12-10 18:10:54 +01:00
.prettierrc Migrate to a monorepo structure (#2909) 2023-12-10 18:10:54 +01:00
.swcrc Compile with swc on twenty-server (#4863) 2024-04-14 09:09:51 +02:00
jest.config.ts Refactor backend folder structure (#4505) 2024-03-15 18:37:09 +01:00
nest-cli.json chore: use Nx affected tasks in CI (#5110) 2024-04-30 16:28:25 +02:00
package.json Bump versions to 0.11 (#5289) 2024-05-03 19:11:03 +02:00
project.json Feat/migrate password reset token to app token table (#5051) 2024-05-06 15:30:03 +02:00
tsconfig.build.json chore: set up twenty-emails config so build isn't needed in development (#3619) 2024-01-29 06:17:12 -03:00
tsconfig.json 4586 fix workspace member feature (#4680) 2024-03-28 17:59:48 +01:00