Skip to content

Conversation

@iamonah
Copy link
Contributor

@iamonah iamonah commented Aug 3, 2025

What

Rename parameter databaseName to databaseDriverName in NewWithInstance, NewWithDatabaseInstance functions and in the migrate object to clarify its purpose.

Why

The current name, databaseName, may confuse users into thinking it refers to the actual name of their database (e.g. "bank", "test_db"), when in reality it refers to the database driver name (e.g. "postgres", "mysql").

This change improves readability and aligns with the sourceName parameter, which correctly indicates that it's the name of the source driver.

@dhui would you mind reviewing when you get a chance? 🙏

Copy link
Member

@dhui dhui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iamonah Thanks for the variable rename! We're lucky it's not an exported field so we're able to make this change.

@dhui dhui merged commit a371c8e into golang-migrate:master Nov 27, 2025
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants