Skip to content

Commit

Permalink
remove temp drop tabble
Browse files Browse the repository at this point in the history
  • Loading branch information
vramk23 committed Oct 26, 2023
1 parent 08b9622 commit 0f276af
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
17 changes: 15 additions & 2 deletions capten/agent/pkg/capten-store/app_config_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const (
icon, installStatus = "icon", "install_status"
updateTime = "update_time"
usecase, projectUrl, status, details = "usecase", "project_url", "status", "details"
pluginName, pluginDescription = "plugin_name", "plugin_description"
)

var (
Expand Down Expand Up @@ -99,7 +100,8 @@ func (a *Store) GetAppConfig(appReleaseName string) (*agentpb.SyncAppData, error
&overrideValues, &launchUiValues,
&templateValues, &config.DefualtApp,
&config.Icon, &config.InstallStatus,
&config.LastUpdateTime,
&config.LastUpdateTime, &config.PluginName,
&config.PluginDescription,
); err != nil {
return nil, err
}
Expand Down Expand Up @@ -135,7 +137,8 @@ func (a *Store) GetAllApps() ([]*agentpb.SyncAppData, error) {
&overrideValues, &launchUiValues,
&templateValues, &config.DefualtApp,
&config.Icon, &config.InstallStatus,
&config.LastUpdateTime,
&config.LastUpdateTime, &config.PluginName,
&config.PluginDescription,
) {
configCopy := config
overrideValuesCopy, _ := base64.StdEncoding.DecodeString(overrideValues)
Expand Down Expand Up @@ -245,6 +248,16 @@ func formUpdateKvPairs(config *agentpb.SyncAppData) (string, bool) {
fmt.Sprintf("%s = '%s'", installStatus, config.Config.InstallStatus))
}

if config.Config.PluginName != "" {
params = append(params,
fmt.Sprintf("%s = '%s'", pluginName, config.Config.PluginName))
}

if config.Config.PluginDescription != "" {
params = append(params,
fmt.Sprintf("%s = '%s'", pluginDescription, config.Config.PluginDescription))
}

params = append(params,
fmt.Sprintf("%s = '%s'", updateTime, time.Now().Format(time.RFC3339)))

Expand Down
1 change: 0 additions & 1 deletion server/pkg/store/astra/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func (a *AstraServerStore) initClient() error {
func (a *AstraServerStore) InitializeDb() error {
initDbQueries := []string{
fmt.Sprintf(createClusterEndpointTableQuery, a.keyspace),
fmt.Sprintf("DROP TABLE %s.store_app_config;", a.keyspace),
fmt.Sprintf(createAppConfigTableQuery, a.keyspace),
fmt.Sprintf(createCacheAgentAppLaunchesTableQuery, a.keyspace),
}
Expand Down

0 comments on commit 0f276af

Please sign in to comment.