Next-auth: how should altering the User table be done?

Created on 18 Sep 2020  路  2Comments  路  Source: nextauthjs/next-auth

Question
When modifying the User TypeORM following this documentation, and re-running the app, I do not see the changes in the database schema. What did I miss?

What I am trying to do
I am trying to extend the User schema with a custom field.

Feedback
Documentation refers to searching through online documentation, code comments and issue history. The example project refers to next-auth-example.

  • [ ] Found the documentation helpful
  • [x] Found documentation but was incomplete
  • [ ] Could not find relevant documentation
  • [ ] Found the example project helpful
  • [ ] Did not find the example project helpful
question

All 2 comments

I found a solution - dropping all the tables from my schema. I was expecting a migration to be done but I guess there's more to this scenario.

I found a solution - dropping all the tables from my schema. I was expecting a migration to be done but I guess there's more to this scenario.

Yikes! You are right, this is a scenario where migration would be really handy.

We haven't had to support migrations of the internal schema so far (though it seems obviously like we will need it at some point in the future), but this is certainly a scenario where it would be useful.

Thanks for coming back and updating this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benoror picture benoror  路  3Comments

MelMacaluso picture MelMacaluso  路  3Comments

alex-cory picture alex-cory  路  3Comments

simonbbyrne picture simonbbyrne  路  3Comments

ryanditjia picture ryanditjia  路  3Comments