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

Database migration does not work #358

Open
VladPxC opened this issue Dec 6, 2023 · 0 comments · Fixed by #406
Open

Database migration does not work #358

VladPxC opened this issue Dec 6, 2023 · 0 comments · Fixed by #406
Labels
bug Something isn't working

Comments

@VladPxC
Copy link

VladPxC commented Dec 6, 2023

Describe the bug
When I am using the Command Center to execute any migration script, it always fails.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new migration via the 'dotnet ef migrations add ' command.
  2. Start the server and open the Command Center.
  3. Go to your database model
  4. Select the created migration under the migration tab.
  5. Click "apply selected migration"

Expected behavior
The migration is applied and removed from the list.

Environment:

  • Moryx.CommandCenter.Web Version 6.2.5

Additional context
Initial investigations using the developer console have shown that the endpoint addressed by the command center does not exist.
The Command Center requests the URL http://<hostname>/databases/<database-model>/<migration-script>/migrate via a post request which results in a 404 Not Found.

Workaround:
Call the endpoint without the name of the migration script by using Postman or curl. But be careful it executes all available migrations related to the provided model.
URL:

http://<hostname>/databases/<database-model>/migrate

Request Body:

{"configuratorTypename":"Moryx.Model.PostgreSQL.NpgsqlModelConfigurator, Moryx.Model.PostgreSQL, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null","entries":{"Database":"
<YOUR_DATABASE-NAME>
","ConnectionString":"Username=<USERNAME>;Password=<PASSWORD>;Host=localhost;Port=<DB_PORT>"}}
@VladPxC VladPxC added the bug Something isn't working label Dec 6, 2023
@seveneleven seveneleven linked a pull request Apr 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant