refactorization to manage old rules with a separated class
[brisk.git] / sql / sql.d / 085-tourn-update.sql
diff --git a/sql/sql.d/085-tourn-update.sql b/sql/sql.d/085-tourn-update.sql
new file mode 100644 (file)
index 0000000..56dd0c4
--- /dev/null
@@ -0,0 +1,7 @@
+--  from:
+--    INSERT INTO #PFX#bin5_tournaments (code, active, name) VALUES (1, 1, 'normal match');
+--    INSERT INTO #PFX#bin5_tournaments (code, active, name) VALUES (2, 1, 'special match');
+
+UPDATE #PFX#bin5_tournaments SET (name) = ('old rules: with draw') WHERE code = 1;
+UPDATE #PFX#bin5_tournaments SET (name) = ('new rules: without draw') WHERE code = 2;
+INSERT INTO #PFX#bin5_tournaments (code, active, name) VALUES (3, 1, 'special match');