diff --git a/serv_golang_rest_api/pkg/database/postgres.go b/serv_golang_rest_api/pkg/database/postgres.go index 3bc7947..9c250a3 100644 --- a/serv_golang_rest_api/pkg/database/postgres.go +++ b/serv_golang_rest_api/pkg/database/postgres.go @@ -28,7 +28,7 @@ func NewPostgresConnection(cfg *config.Config) (*gorm.DB, error) { return db, nil } -func autoMigrate(db *gorm.DB) error { +func AutoMigrate(db *gorm.DB) error { // Сначала добавляем колонку как NULLABLE if err := db.Exec(`ALTER TABLE users ADD COLUMN IF NOT EXISTS password VARCHAR(255)`).Error; err != nil { return err