From: Ant Zucaro Date: Thu, 4 Feb 2016 23:03:39 +0000 (-0500) Subject: Give the active MVs primary keys. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9e8e63cd15de0d369562e02254c15ced9a4656a8;p=xonotic%2Fxonstatdb.git Give the active MVs primary keys. --- 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;