srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/server/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'crates/server/migrations')
-rw-r--r--crates/server/migrations/0009_bot_players.sql8
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/server/migrations/0009_bot_players.sql b/crates/server/migrations/0009_bot_players.sql
new file mode 100644
index 0000000..790eb85
--- /dev/null
+++ b/crates/server/migrations/0009_bot_players.sql
@@ -0,0 +1,8 @@
+- Bots are ordinary users with a flag, not a parallel identity system: they
+- appear in the same tables, are ranked by the same query, and are joined to
+- the same cosmetics. The flag exists so the client can label them, because a
+- board that mixes synthetic scores into human ones without saying so is
+- telling its users something untrue.
+ALTER TABLE users ADD COLUMN is_bot INTEGER NOT NULL DEFAULT 0;
+
+CREATE INDEX idx_users_is_bot ON users(is_bot);