FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Database Migration for Spanner Using golang-migrate
NewsDevOps

Database Migration for Spanner Using golang-migrate

via Dev.toKenta Takeuchi12h ago

This article was originally published on bmf-tech.com . Overview I used golang-migrate for database migration with Spanner, so here's a note. Usage Assuming usage with Docker. I was running it as a binary instead of Docker, but it might not work depending on the version of OpenSSL on the host machine, so running it in a container seems safer. MIGRATE_VERSION = 'v4.14.1' docker run -v /migrations:/migrations -v ~/.config/gcloud/:/root/.config/gcloud --network host migrate/migrate: ${ MIGRATE_VERSION } -path = /migrations/ -database spanner://projects/<PROJECT ID>/instances/<INSTANCE>/databases/<DATABASE>?x-clean-statements = True <COMMAND> Specify commands like up, down, version, etc., in COMMAND. cf. github.com - golang/migrate/migrate/tree/master/cmd/migrate#usage I wrote the execution command as a one-liner, so it might be hard to read, but there shouldn't be anything particularly difficult. The two mounts are as follows: -v /migrations:/migrations -v ~/.config/gcloud/:/root/.config/

Continue reading on Dev.to

Opens in a new tab

Read Full Article
5 views

Related Articles

Brompton Electric T-Line Folding Electric Bicycle Review: Pocket-Sized Pedal Power
News

Brompton Electric T-Line Folding Electric Bicycle Review: Pocket-Sized Pedal Power

Wired • 10h ago

News

Gothub is live

Lobsters • 11h ago

I Built the Tool I Wish I Had When I Started My Open Source Journey
News

I Built the Tool I Wish I Had When I Started My Open Source Journey

Medium Programming • 11h ago

Razer Boomslang 20th Anniversary Mouse Review: For Collectors
News

Razer Boomslang 20th Anniversary Mouse Review: For Collectors

Wired • 11h ago

How Bug Bounty Hunters Prioritize 10,000 Recon Targets (Without Losing Their Mind)
News

How Bug Bounty Hunters Prioritize 10,000 Recon Targets (Without Losing Their Mind)

Medium Programming • 11h ago

Discover More Articles