From 9e8e63cd15de0d369562e02254c15ced9a4656a8 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Thu, 4 Feb 2016 18:03:39 -0500 Subject: [PATCH] Give the active MVs primary keys. --- tables/active_maps_mv.sql | 3 ++- tables/active_players_mv.tab | 3 ++- tables/active_servers_mv.tab | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tables/active_maps_mv.sql b/tables/active_maps_mv.sql index f7afdae..aeaccbc 100755 --- a/tables/active_maps_mv.sql +++ b/tables/active_maps_mv.sql @@ -3,7 +3,8 @@ create table active_maps_mv( map_id bigint, map_name character varying(128), games integer, - create_dt timestamp without time zone default (now() at time zone 'UTC') + create_dt timestamp without time zone default (now() at time zone 'UTC'), + CONSTRAINT active_maps_mv_pk PRIMARY KEY (sort_order) ); ALTER TABLE xonstat.active_maps_mv OWNER TO xonstat; diff --git a/tables/active_players_mv.tab b/tables/active_players_mv.tab index 0d22213..6d41752 100755 --- a/tables/active_players_mv.tab +++ b/tables/active_players_mv.tab @@ -3,7 +3,8 @@ create table active_players_mv( player_id bigint, nick character varying(128), alivetime interval, - create_dt timestamp without time zone default (now() at time zone 'UTC') + create_dt timestamp without time zone default (now() at time zone 'UTC'), + CONSTRAINT active_players_mv_pk PRIMARY KEY (sort_order) ); ALTER TABLE xonstat.active_players_mv OWNER TO xonstat; diff --git a/tables/active_servers_mv.tab b/tables/active_servers_mv.tab index 28fcb6d..a6be890 100755 --- a/tables/active_servers_mv.tab +++ b/tables/active_servers_mv.tab @@ -3,7 +3,8 @@ create table active_servers_mv( server_id bigint, server_name character varying(128), games integer, - create_dt timestamp without time zone default (now() at time zone 'UTC') + create_dt timestamp without time zone default (now() at time zone 'UTC'), + CONSTRAINT active_servers_mv_pk PRIMARY KEY (sort_order) ); ALTER TABLE xonstat.active_servers_mv OWNER TO xonstat; -- 2.39.2