Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New model design #156

Open
amirrr opened this issue Jun 25, 2024 · 0 comments
Open

New model design #156

amirrr opened this issue Jun 25, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@amirrr
Copy link
Collaborator

amirrr commented Jun 25, 2024

We want to move to a new database design or perhaps even a new database ORM, as our current version — sequilize — is blocking us from comfortably migrating the backend to typescript. Our database models should be fluent and should propagate to the front-end so we would have one source of truth.

It would be nice to have our database models be built from a typescript/javascript object which we can easily use for type referring on the front-end. Prisma seems like a good alternative but it requires us to change all the database calls. So for now just having the models built from javascript objects is a good addition which we can build on in the future.

Acceptance criteria:

  1. All the database models under server/models should be built from a typescript/javascript object.
  2. All the database call should work as before without any problem.

Nice to have

  1. We should be able to have migration scripts for when we want to change our design through those files
  2. Add a migration command to our package.json for such cases
@amirrr amirrr added the enhancement New feature or request label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant