Skip to content

Create initial admin user in data migration #635

@AdrianDAlessandro

Description

@AdrianDAlessandro

We need a way to get an admin user into the database.

Get the email and username from environment variables.

  • ADMIN_USERNAME
  • ADMIN_EMAIL

Would shouldn't need a password because we have a lost password functionality

Also, worth checking if the email is in the DB already, and in that case, just make that user a superuser

Something like https://stackoverflow.com/a/72134313

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

✅ Done

Relationships

None yet

Development

No branches or pull requests

Issue actions