You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2016/11/14 17:07:48 UTC

[45/53] [abbrv] incubator-trafficcontrol git commit: use ON CONFLICT DO NOTHING instead of IGNORE for psql

use ON CONFLICT DO NOTHING instead of IGNORE for psql


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/be8ef1d2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/be8ef1d2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/be8ef1d2

Branch: refs/heads/psql-rebase
Commit: be8ef1d216a5ee4304360da312615a04474173d4
Parents: 334a65d
Author: Dan Kirkwood <da...@gmail.com>
Authored: Thu Oct 27 14:55:16 2016 -0600
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Fri Nov 11 14:22:42 2016 -0700

----------------------------------------------------------------------
 traffic_ops/app/db/seeds.sql | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/be8ef1d2/traffic_ops/app/db/seeds.sql
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/seeds.sql b/traffic_ops/app/db/seeds.sql
index 03be14a..6445ef1 100644
--- a/traffic_ops/app/db/seeds.sql
+++ b/traffic_ops/app/db/seeds.sql
@@ -137,12 +137,12 @@ insert ignore into profile (name, description) values ('RIAK_ALL', 'Riak profile
 insert ignore into type (name, description, use_in_table) values ('RIAK', 'Riak keystore', 'server');
 
 
-insert ignore into profile (name, description) values ('TRAFFIC_STATS', 'Traffic_Stats profile');
-insert ignore into profile (name, description) values ('TRAFFIC_PORTAL', 'Traffic_Portal profile');
-insert ignore into type (name, description, use_in_table) values ('TRAFFIC_STATS', 'traffic_stats server', 'server');
-insert ignore into type (name, description, use_in_table) values ('TRAFFIC_PORTAL', 'traffic_portal server', 'server');
-insert ignore into type (name, description, use_in_table) values ('INFLUXDB', 'influxDb server', 'server');
-insert ignore into profile (name, description) values ('INFLUXDB', 'InfluxDb profile');
+insert into profile (name, description) values ('TRAFFIC_STATS', 'Traffic_Stats profile') ON CONFLICT DO NOTHING;
+insert into profile (name, description) values ('TRAFFIC_PORTAL', 'Traffic_Portal profile') ON CONFLICT DO NOTHING;
+insert into type (name, description, use_in_table) values ('TRAFFIC_STATS', 'traffic_stats server', 'server') ON CONFLICT DO NOTHING;
+insert into type (name, description, use_in_table) values ('TRAFFIC_PORTAL', 'traffic_portal server', 'server') ON CONFLICT DO NOTHING;
+insert into type (name, description, use_in_table) values ('INFLUXDB', 'influxDb server', 'server') ON CONFLICT DO NOTHING;
+insert into profile (name, description) values ('INFLUXDB', 'InfluxDb profile') ON CONFLICT DO NOTHING;
 
 
 insert into parameter (name, config_file, value) select * from (select 'CacheStats', 'traffic_stats.config', 'bandwidth') as temp where not exists (select name from parameter where name = 'CacheStats' and config_file = 'traffic_stats.config' and value = 'bandwidth') limit 1;