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

how to execute .\build MigrateDatabase "connection_string" #290

Open
Tony20221 opened this issue Dec 11, 2023 · 2 comments
Open

how to execute .\build MigrateDatabase "connection_string" #290

Tony20221 opened this issue Dec 11, 2023 · 2 comments

Comments

@Tony20221
Copy link

The readme has this:
Run database migrations using MigrateDatabase NUKE target:
.\build MigrateDatabase "connection_string"

How does one run this command?

@vikramvee
Copy link
Contributor

Replace the connection_string with the connection string for your SQL server.
You need to navigate to the root folder i.e. "modular-monolith-with-ddd" in the command prompt and execute the command.

For Example, for me it was like below in command prompt. The command basically execute the build.ps1 powershell script.

C:\Study\GitProjects\modular-monolith-with-ddd>.\build MigrateDatabase --DatabaseConnectionString "Server=localhost\SQLEXPRESS;Database=MyMeetings;Trusted_Connection=True;TrustServerCertificate=True"

@domenperc
Copy link

domenperc commented Mar 10, 2024

Hello,
I suggest updating the README file. The following command worked for me:
.\build MigrateDatabase -DatabaseConnectionString "connection_string"

To answer OP:
Open powershell in the root folder where build.ps1 file is and run the command. Replace "connecton_string" with your actual connection string. You can copy it from SQL Server manager under database properties. I removed all the parameters except Initial Catalog to remove any conflicts for a start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants