X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=sql%2Fsql.d%2F060-tournament.sql;h=90b54a21f5a404131fa68efde509df5039c1b2c7;hb=330d75c856cac51f3136b1ab1791c8ef8c564ac0;hp=b26a1b132f0c1a92818049ae328a687d88718420;hpb=8e4b8df113c19f41ddab9e31f9fd4fc24db2d91f;p=brisk.git diff --git a/sql/sql.d/060-tournament.sql b/sql/sql.d/060-tournament.sql index b26a1b1..90b54a2 100644 --- a/sql/sql.d/060-tournament.sql +++ b/sql/sql.d/060-tournament.sql @@ -1,4 +1,4 @@ -DROP TABLE #PFX#bin5_tournaments; +DROP TABLE IF EXISTS #PFX#bin5_tournaments; CREATE TABLE #PFX#bin5_tournaments ( code SERIAL PRIMARY KEY, active integer, @@ -17,4 +17,4 @@ ALTER TABLE #PFX#bin5_matches DROP CONSTRAINT #PFX#bin5_matches_tcode_fkey; ALTER TABLE #PFX#bin5_matches ADD FOREIGN KEY (tcode) REFERENCES #PFX#bin5_tournaments(code) ON UPDATE cascade ON DELETE cascade; ALTER TABLE #PFX#bin5_games DROP COLUMN act; -ALTER TABLE #PFX#bin5_games ADD COLUMN act integer; -- end reason of the game +ALTER TABLE #PFX#bin5_games ADD COLUMN act integer DEFAULT -1; -- end reason of the game