dangogh closed pull request #2668: Traffic Ops - Admin.pl load_schema proper 
exit codes and eval
URL: https://github.com/apache/trafficcontrol/pull/2668
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_ops/app/db/admin.pl b/traffic_ops/app/db/admin.pl
index 663df62e5..1b2367312 100755
--- a/traffic_ops/app/db/admin.pl
+++ b/traffic_ops/app/db/admin.pl
@@ -204,7 +204,7 @@ sub patches {
 sub load_schema {
        print "Creating database tables.\n";
        local $ENV{PGPASSWORD} = $db_password;
-       if ( system("psql -h $host_ip -p $host_port -d $db_name -U $db_user -e 
< db/create_tables.sql") != 0 ) {
+       if ( system("psql -h $host_ip -p $host_port -d $db_name -U $db_user -e 
-v ON_ERROR_STOP=1 < db/create_tables.sql") != 0 ) {
                die "Can't create database tables\n";
        }
 }
diff --git a/traffic_ops/app/db/create_tables.sql 
b/traffic_ops/app/db/create_tables.sql
index 4a9df8523..12ba3d999 100644
--- a/traffic_ops/app/db/create_tables.sql
+++ b/traffic_ops/app/db/create_tables.sql
@@ -35,13 +35,6 @@ SET row_security = off;
 CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
 
 
---
--- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: 
---
-
-COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
-
-
 SET search_path = public, pg_catalog;
 
 --


 

----------------------------------------------------------------
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