aboutsummaryrefslogtreecommitdiffstats
path: root/sql/sqlite/patch-user-user_editcount.sql
blob: fb105df81c48aac4d757e34f6ae815ed290429ee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
-- This file is automatically generated using maintenance/generateSchemaChangeSql.php.
-- Source: sql/abstractSchemaChanges/patch-user-user_editcount.json
-- Do not modify this file directly.
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes
CREATE TEMPORARY TABLE /*_*/__temp__user AS
SELECT
  user_id,
  user_name,
  user_real_name,
  user_password,
  user_newpassword,
  user_newpass_time,
  user_email,
  user_touched,
  user_token,
  user_email_authenticated,
  user_email_token,
  user_email_token_expires,
  user_registration,
  user_editcount,
  user_password_expires
FROM /*_*/user;
DROP TABLE /*_*/user;


CREATE TABLE /*_*/user (
    user_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
    user_name BLOB DEFAULT '' NOT NULL,
    user_real_name BLOB DEFAULT '' NOT NULL,
    user_password BLOB NOT NULL, user_newpassword BLOB NOT NULL,
    user_newpass_time BLOB DEFAULT NULL,
    user_email BLOB NOT NULL, user_touched BLOB NOT NULL,
    user_token BLOB DEFAULT '' NOT NULL,
    user_email_authenticated BLOB DEFAULT NULL,
    user_email_token BLOB DEFAULT NULL,
    user_email_token_expires BLOB DEFAULT NULL,
    user_registration BLOB DEFAULT NULL,
    user_editcount INTEGER UNSIGNED DEFAULT NULL,
    user_password_expires BLOB DEFAULT NULL
  );
INSERT INTO /*_*/user (
    user_id, user_name, user_real_name,
    user_password, user_newpassword,
    user_newpass_time, user_email, user_touched,
    user_token, user_email_authenticated,
    user_email_token, user_email_token_expires,
    user_registration, user_editcount,
    user_password_expires
  )
SELECT
  user_id,
  user_name,
  user_real_name,
  user_password,
  user_newpassword,
  user_newpass_time,
  user_email,
  user_touched,
  user_token,
  user_email_authenticated,
  user_email_token,
  user_email_token_expires,
  user_registration,
  user_editcount,
  user_password_expires
FROM
  /*_*/__temp__user;
DROP TABLE /*_*/__temp__user;

CREATE UNIQUE INDEX user_name ON /*_*/user (user_name);

CREATE INDEX user_email_token ON /*_*/user (user_email_token);

CREATE INDEX user_email ON /*_*/user (user_email);