DEV Community

Cover image for Setting up golang-migrate for windows
Prem
Prem

Posted on

6 2

Setting up golang-migrate for windows

First Install scoop

But Wait! What is scoop

Scoop is a command-line package manager for Windows which makes it easier to install and use common programs and tools.

Make sure PowerShell 5 (or later, include PowerShell Core) and .NET Framework 4.5 (or later) are installed. Then run:

Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')

or 
iwr -useb get.scoop.sh | iex 
Enter fullscreen mode Exit fullscreen mode

In case you get an error, you might need to change the execution policy (i.e. enable Powershell) with:

Set-ExecutionPolicy RemoteSigned -scope CurrentUser
Enter fullscreen mode Exit fullscreen mode

Now that you have installed scoop on your windows system, we can move ahead with our main task i.e. golang-migrate

Download pre-built binary (Windows, MacOS, or Linux)
curl -L https://github.com/golang-migrate/migrate/releases/download/$version/migrate.$platform-amd64.tar.gz | tar xvz
Enter fullscreen mode Exit fullscreen mode

Now that we have downloaded scoop and the pre-built library for golang-migrate, we will go ahead and install it using this simple command

For Windows

scoop install migrate
Enter fullscreen mode Exit fullscreen mode

And There You GO!!!
Your golang-migrate is setup for windows.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (1)

Collapse
 
parvineyvazov profile image
Parvin Eyvazov

Thank you so much. You saved my time!

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay