Execute database migrations in production using golang-migrate with the up command and a secure connection string.
Run migrations in production by executing your migration tool against the live database within a transaction to ensure atomicity. Use golang-migrate with the -path flag pointing to your SQL directory and the -database flag pointing to your production connection string.
migrate -path /app/migrations -database "postgres://user:pass@host:5432/dbname?sslmode=require" up
Database migrations are scripts that update your database structure to match your application code. You run them in production to safely add new tables or columns without losing data. Think of it like a version control system for your database schema that ensures everyone is on the same page.