|
|
@@ -9,9 +9,7 @@ import (
|
|
|
adapter "github.com/porter-dev/porter/internal/adapter"
|
|
|
"github.com/porter-dev/porter/internal/config"
|
|
|
lr "github.com/porter-dev/porter/internal/logger"
|
|
|
- "github.com/porter-dev/porter/internal/models"
|
|
|
-
|
|
|
- ints "github.com/porter-dev/porter/internal/models/integrations"
|
|
|
+ "github.com/porter-dev/porter/internal/repository/gorm"
|
|
|
|
|
|
"github.com/joeshaw/envdecode"
|
|
|
)
|
|
|
@@ -29,41 +27,11 @@ func main() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- err = db.AutoMigrate(
|
|
|
- &models.Project{},
|
|
|
- &models.Role{},
|
|
|
- &models.User{},
|
|
|
- &models.Release{},
|
|
|
- &models.Session{},
|
|
|
- &models.GitRepo{},
|
|
|
- &models.Registry{},
|
|
|
- &models.HelmRepo{},
|
|
|
- &models.Cluster{},
|
|
|
- &models.ClusterCandidate{},
|
|
|
- &models.ClusterResolver{},
|
|
|
- &models.Infra{},
|
|
|
- &models.GitActionConfig{},
|
|
|
- &models.Invite{},
|
|
|
- &models.AuthCode{},
|
|
|
- &models.DNSRecord{},
|
|
|
- &models.PWResetToken{},
|
|
|
- &ints.KubeIntegration{},
|
|
|
- &ints.BasicIntegration{},
|
|
|
- &ints.OIDCIntegration{},
|
|
|
- &ints.OAuthIntegration{},
|
|
|
- &ints.GCPIntegration{},
|
|
|
- &ints.AWSIntegration{},
|
|
|
- &ints.TokenCache{},
|
|
|
- &ints.ClusterTokenCache{},
|
|
|
- &ints.RegTokenCache{},
|
|
|
- &ints.HelmRepoTokenCache{},
|
|
|
- &ints.GithubAppInstallation{},
|
|
|
- &ints.GithubAppOAuthIntegration{},
|
|
|
- &ints.SlackIntegration{},
|
|
|
- )
|
|
|
+ err = gorm.AutoMigrate(db)
|
|
|
|
|
|
if err != nil {
|
|
|
- panic(err)
|
|
|
+ logger.Fatal().Err(err).Msg("")
|
|
|
+ return
|
|
|
}
|
|
|
|
|
|
if shouldRotate, oldKeyStr, newKeyStr := shouldKeyRotate(); shouldRotate {
|