rawlinp commented on a change in pull request #3186: All functionality for the 
admin program is now located in admin.go
URL: https://github.com/apache/trafficcontrol/pull/3186#discussion_r246502719
 
 

 ##########
 File path: traffic_ops/app/db/admin.go
 ##########
 @@ -303,12 +303,12 @@ func loadSchema() {
 }
 
 func reverseSchema() {
-       fmt.Println("WARNING: the '" + CmdReverseSchema + "' command will be 
removed with Traffic Ops Perl because it will no longer be necessary")
-       cmd := exec.Command("db/admin.pl", "--env="+Environment, 
CmdReverseSchema)
+       fmt.Fprintf(os.Stderr, "WARNING: the '%s' command will be removed with 
Traffic Ops Perl because it will no longer be necessary\n", CmdReverseSchema)
+       cmd := exec.Command("db/reverse_schema.pl")
 
 Review comment:
   This command needs the MOJO_MODE environment variable injected in order to 
reverse_schema on a specific environment (rather than just "development"):
   ```
   cmd := exec.Command("db/reverse_schema.pl")
   cmd.Env = append(os.Environ(), "MOJO_MODE="+Environment)
   ...
   ```
   
   With that fixed I believe this will be good to go.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to