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

Documentation : Documentation Update Required for EF Migration Steps #2761

Open
TLeoDev opened this issue Jan 5, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation
Milestone

Comments

@TLeoDev
Copy link
Member

TLeoDev commented Jan 5, 2024

Expected Behavior

The documentation should guide users through the Entity Framework (EF) migration process in a way that the steps can be executed smoothly and without errors.

Current Behavior

Currently, the documentation's sequence for EF migration leads to potential issues. The steps mentioned for applying migration changes for PostgreSQL and MySQL are out of order. The necessary adjustments in the migration file (as detailed in step 4) need to be performed before executing the MySQL migration command.

Steps to Reproduce

  1. Follow the documentation steps for EF migration.
  2. Notice that executing the command for MySQL migration (dotnet ef migrations add "<nameofyourmigration>" -p ..\IoTHub.Portal.MySql\ -v -- --DbProvider MySQL) fails if the adjustments in step 4 are not done beforehand.

Context (Environment)

Portal version: [e.g., 1.0.2]
LoRaWAN Stack version: [e.g., 2.0.0]

Suggested Changes

The documentation should be updated to reflect the following order:

  1. Go into the Server project folder with terminal:
cd .\IoTHub.Portal.Server\
  1. Execute the command for PostgreSQL provider:
dotnet ef migrations add "<nameofyourmigration>" -p ..\IoTHub.Portal.Postgres\ -v -- --DbProvider PostgreSQL
  1. Open the created migration and adjust as follows:

    a) Move the using directive into the namespace directive.
    b) Add "_ =" before each statement of the Up and Down methods.
    c) Add the CGI copyright to the top of the file.

  2. Execute the command for MySQL provider (only after the above adjustments):

dotnet ef migrations add "<nameofyourmigration>" -p ..\IoTHub.Portal.MySql\ -v -- --DbProvider MySQL
  1. Open the newly created migration for MySQL and repeat step 3.
@TLeoDev TLeoDev added the bug Something isn't working label Jan 5, 2024
@github-project-automation github-project-automation bot moved this to 📝 Todo in IoT Hub Portal Jan 5, 2024
@TLeoDev TLeoDev added the documentation Improvements or additions to documentation label Jan 5, 2024
@Metal-Mighty Metal-Mighty added this to the v6.0 milestone Oct 16, 2024
@judramos judramos self-assigned this Nov 29, 2024
@judramos judramos moved this from 📝 Todo to 🚧 In Progress in IoT Hub Portal Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
Status: 🚧 In Progress
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants