···15151616var ErrDatabaseEnvironmentVariableNotSet = errors.New("DB_URL environment variable not set")
17171818+// RunMigrations applies database schema migrations to a PostgreSQL database
1919+// using the specified migration source. It loads environment variables from a
2020+// predefined file and checks for the "DB_URL" variable (trimming any
2121+// surrounding quotes). If "DB_URL" is missing, it returns
2222+// [ErrDatabaseEnvironmentVariableNotSet]. It then opens a PostgreSQL driver
2323+// connection, initializes a migration instance with the given source, and
2424+// executes the migration using the Up method, returning any errors encountered
2525+// except for those indicating no changes.
1826func RunMigrations(source string) error {
1927 env, _ := gotenv.LoadEnvFromFS(fs.EnvFile, gotenv.LoadOptions{OverrideExistingVars: false})
2028