X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=sql%2Fsql.d%2F054-continue-match.sql;h=e95059a0fabc83fc1636ed8c2fb46b89597ccb84;hb=484a365c1e66ba4b878117275423a1594c209960;hp=2aefdcac924a7ffec41474e27c24d79925c7ad24;hpb=c5f862d7fbe0458d0bf66fbac37af9ac0e61dfcf;p=brisk.git diff --git a/sql/sql.d/054-continue-match.sql b/sql/sql.d/054-continue-match.sql index 2aefdca..e95059a 100644 --- a/sql/sql.d/054-continue-match.sql +++ b/sql/sql.d/054-continue-match.sql @@ -1,16 +1,31 @@ -DROP TABLE #PFX#bin5_table_order; -CREATE TABLE #PFX#bin5_table_order ( +DROP TABLE IF EXISTS #PFX#bin5_table_orders; +CREATE TABLE #PFX#bin5_table_orders ( mcode integer REFERENCES #PFX#bin5_matches (code) ON DELETE cascade ON UPDATE cascade, - ucode integer REFERENCES #PFX#users (code) ON DELETE cascade ON UPDATE cascade, - pos integer + pos integer, + ucode integer REFERENCES #PFX#users (code) ON DELETE cascade ON UPDATE cascade ); +ALTER TABLE #PFX#bin5_matches DROP COLUMN mult_next; ALTER TABLE #PFX#bin5_matches ADD COLUMN mult_next integer DEFAULT -1; -- next multiplier + +ALTER TABLE #PFX#bin5_matches DROP COLUMN mazzo_next; ALTER TABLE #PFX#bin5_matches ADD COLUMN mazzo_next integer DEFAULT -1; -- next card shaker + +ALTER TABLE #PFX#bin5_games DROP COLUMN asta_pnt; ALTER TABLE #PFX#bin5_games ADD COLUMN asta_pnt integer DEFAULT -1; -- curr bet points + +ALTER TABLE #PFX#bin5_games DROP COLUMN pnt; ALTER TABLE #PFX#bin5_games ADD COLUMN pnt integer DEFAULT -1; -- curr points made + +ALTER TABLE #PFX#bin5_games DROP COLUMN asta_win; ALTER TABLE #PFX#bin5_games ADD COLUMN asta_win integer DEFAULT -1; -- curr caller id + +ALTER TABLE #PFX#bin5_games DROP COLUMN friend; ALTER TABLE #PFX#bin5_games ADD COLUMN friend integer DEFAULT -1; -- curr callee id + +ALTER TABLE #PFX#bin5_games DROP COLUMN mazzo; ALTER TABLE #PFX#bin5_games ADD COLUMN mazzo integer DEFAULT -1; -- curr card shaker + +ALTER TABLE #PFX#bin5_games DROP COLUMN mult; ALTER TABLE #PFX#bin5_games ADD COLUMN mult integer DEFAULT -1; -- curr multiplier