Impactworkers / iw-complaint-manager

Impactworkers Complaint Manager
1 stars 0 forks source link

Set up Sequelize #7

Closed faraakhatTW closed 5 months ago

faraakhatTW commented 6 months ago

User Story

As a developer I want to integrate Sequelize into our project So that I can simplify database interactions and enhance data management capabilities

Definition of Done

Acceptance Criteria

Given sequelize is installed When I create a dummy model (i.e. User) AND trigger the creation of that table using sequelize Then I see that table in dbeaver (localhost)

Note: Do not persist any dummy code/data

arihu1008 commented 6 months ago

We have installed sequelize in our project and created database iw-complaint-manager The issue was when we wrote sequelize_config file with .ts extension and compiled to .js, node could not read it with this error:

Image

So we deleted compiled .js file and changed out .ts to .js. Database connection logs a success message now.

arihu1008 commented 6 months ago

Finished defining a User model but can't run .ts file with following errors:

Image Image

arihu1008 commented 6 months ago

Image