summaryrefslogtreecommitdiff
path: root/www/wiki/maintenance/mssql/archives/patch-bot_passwords.sql
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/maintenance/mssql/archives/patch-bot_passwords.sql')
-rw-r--r--www/wiki/maintenance/mssql/archives/patch-bot_passwords.sql13
1 files changed, 13 insertions, 0 deletions
diff --git a/www/wiki/maintenance/mssql/archives/patch-bot_passwords.sql b/www/wiki/maintenance/mssql/archives/patch-bot_passwords.sql
new file mode 100644
index 00000000..7718ffaa
--- /dev/null
+++ b/www/wiki/maintenance/mssql/archives/patch-bot_passwords.sql
@@ -0,0 +1,13 @@
+--
+-- This table contains a user's bot passwords: passwords that allow access to
+-- the account via the API with limited rights.
+--
+CREATE TABLE /*_*/bot_passwords (
+ bp_user int NOT NULL REFERENCES /*_*/mwuser(user_id) ON DELETE CASCADE,
+ bp_app_id nvarchar(32) NOT NULL,
+ bp_password nvarchar(255) NOT NULL,
+ bp_token nvarchar(255) NOT NULL,
+ bp_restrictions nvarchar(max) NOT NULL,
+ bp_grants nvarchar(max) NOT NULL,
+ PRIMARY KEY (bp_user, bp_app_id)
+);