]> de.git.xonotic.org Git - xonotic/xonstatdb.git/commitdiff
Give the active MVs primary keys.
authorAnt Zucaro <azucaro@gmail.com>
Thu, 4 Feb 2016 23:03:39 +0000 (18:03 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Thu, 4 Feb 2016 23:03:39 +0000 (18:03 -0500)
tables/active_maps_mv.sql
tables/active_players_mv.tab
tables/active_servers_mv.tab

index f7afdae9c1d82ae0dd26bf42b421e9016f45e7e9..aeaccbc2edd9336138d5f52c0ff8a5a83ee47f57 100755 (executable)
@@ -3,7 +3,8 @@ create table active_maps_mv(
        map_id bigint,
        map_name character varying(128),
        games integer,
        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;
 );
 
 ALTER TABLE xonstat.active_maps_mv OWNER TO xonstat;
index 0d22213030e0ab51ac5f8b011c0cac4b9207964c..6d41752c57a768ee2855729446085eb656b45e72 100755 (executable)
@@ -3,7 +3,8 @@ create table active_players_mv(
        player_id bigint,
        nick character varying(128),
        alivetime interval,
        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;
 );
 
 ALTER TABLE xonstat.active_players_mv OWNER TO xonstat;
index 28fcb6d8f27647afa20adf496b8be1e13604561f..a6be890dfddd718a8f0ac60f0a1ec9bc2c2ca80f 100755 (executable)
@@ -3,7 +3,8 @@ create table active_servers_mv(
        server_id bigint,
        server_name character varying(128),
        games integer,
        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;
 );
 
 ALTER TABLE xonstat.active_servers_mv OWNER TO xonstat;