cli: remove outdated/unused config values

GitOrigin-RevId: 846553eeb468164d5134bc702747fe986b165c5b
This commit is contained in:
Aravind K P 2021-02-18 18:45:43 +05:30 committed by hasura-bot
parent 9b9bcf5a44
commit c86e9392b9
2 changed files with 1 additions and 16 deletions

View File

@ -315,13 +315,6 @@ func (s *ServerConfig) SetHTTPClient() error {
return nil
}
type DatabaseConfig struct {
Name string `yaml:"name,omitempty"`
Type string `yaml:"type,omitempty"`
MigrationsDirectory string `yaml:"migrations_directory,omitempty"`
SeedsDirectory string `yaml:"seeds_directory,omitempty"`
}
// Config represents configuration required for the CLI to function
type Config struct {
// Version of the config.
@ -337,8 +330,7 @@ type Config struct {
// SeedsDirectory defines the directory where seed files will be stored
SeedsDirectory string `yaml:"seeds_directory,omitempty"`
// ActionConfig defines the config required to create or generate codegen for an action.
ActionConfig *types.ActionExecutionConfig `yaml:"actions,omitempty"`
DatabasesConfig []DatabaseConfig `yaml:"datasources,omitempty"`
ActionConfig *types.ActionExecutionConfig `yaml:"actions,omitempty"`
}
// ExecutionContext contains various contextual information required by the cli

View File

@ -120,13 +120,6 @@ func UpdateProjectV3(opts UpgradeToMuUpgradeProjectToMultipleSourcesOpts) error
// write new config file
newConfig := *opts.EC.Config
newConfig.Version = cli.V3
newConfig.DatabasesConfig = []cli.DatabaseConfig{
{
Name: targetDatabase,
MigrationsDirectory: targetDatabase,
SeedsDirectory: targetDatabase,
},
}
if err := opts.EC.WriteConfig(&newConfig); err != nil {
return err
}