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

[V2][Sessions] Do not try to update the database schema each time the application is launched #766

Closed
LoicPoullain opened this issue Jul 24, 2020 · 1 comment

Comments

@LoicPoullain
Copy link
Member

Issue

Sessions: when launching the application, Foal makes a request to the database to create the session table if it does not exist.

This has two drawbacks:

  • This may make too many undesirable requests to the db in a severless environment.
  • The database schema is updated at runtime outside the classical migration process. This practice can be dangerous and it does not allow to keep a traceability of the modifications of the database schema unlike migrations (revert, etc).

Solution

Use migrations to generate the session table. They can be generated automatically from an entity DatabaseSession exported from @foal/typeorm.

@LoicPoullain
Copy link
Member Author

Resolved in v2.

Issue tracking automation moved this from Work In Progress to Done / Closed This Release Jul 24, 2020
@LoicPoullain LoicPoullain mentioned this issue Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Issue tracking
  
Done / Closed This Release
Development

No branches or pull requests

1 participant