X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=sql%2Fsql.d%2F066-insert-unnorm-games.sql.test;fp=sql%2Fsql.d%2F066-insert-unnorm-games.sql.test;h=a5089cb992e91586455b3e129b17365c1b3f87cc;hb=be87b9bf51733dede3d9e7097769e5a03ee48e75;hp=0000000000000000000000000000000000000000;hpb=2dc23b5fe6d39097b02a5ce367bb50b442498889;p=brisk.git diff --git a/sql/sql.d/066-insert-unnorm-games.sql.test b/sql/sql.d/066-insert-unnorm-games.sql.test new file mode 100644 index 0000000..a5089cb --- /dev/null +++ b/sql/sql.d/066-insert-unnorm-games.sql.test @@ -0,0 +1,20 @@ +DELETE FROM bsk_bin5_matches WHERE code = 100; + +INSERT INTO bsk_bin5_matches (code, ttok, tidx, mazzo_next, mult_next) VALUES (100, 'normalize_points', 2, 1, 1) RETURNING *; +INSERT INTO bsk_bin5_table_orders (mcode, ucode, pos) VALUES (100, 10101, 0); +INSERT INTO bsk_bin5_table_orders (mcode, ucode, pos) VALUES (100, 10102, 1); +INSERT INTO bsk_bin5_table_orders (mcode, ucode, pos) VALUES (100, 10103, 2); +INSERT INTO bsk_bin5_games (code, mcode, tstamp, act, asta_pnt, pnt, asta_win, friend, mazzo, mult) + VALUES (200, 100, to_timestamp(112211221122), 2, 60, 0, -1, -1, 0, 0) RETURNING *; +INSERT INTO bsk_bin5_points (gcode, ucode, pts) VALUES (200, 10101, 0); +INSERT INTO bsk_bin5_points (gcode, ucode, pts) VALUES (200, 10102, 0); +INSERT INTO bsk_bin5_points (gcode, ucode, pts) VALUES (200, 10103, 0); +UPDATE bsk_bin5_matches SET (mazzo_next, mult_next) = (2, 0) WHERE code = 100; +INSERT INTO bsk_bin5_games (code, mcode, tstamp, act, asta_pnt, pnt, asta_win, friend, mazzo, mult) + VALUES (201, 100, to_timestamp(112211221142), 0, 61, 37, 2, 1, 1, 1) RETURNING *; +INSERT INTO bsk_bin5_points (gcode, ucode, pts) VALUES (201, 10101, 2); +INSERT INTO bsk_bin5_points (gcode, ucode, pts) VALUES (201, 10102, -2); +INSERT INTO bsk_bin5_points (gcode, ucode, pts) VALUES (201, 10103, -4); + + +