mirror of
https://github.com/agersant/polaris
synced 2024-12-13 06:42:55 +00:00
14 lines
441 B
MySQL
14 lines
441 B
MySQL
|
CREATE TEMPORARY TABLE users_backup(id, name, password_salt, password_hash, admin);
|
||
|
INSERT INTO users_backup SELECT id, name, password_salt, password_hash, admin FROM users;
|
||
|
DROP TABLE users;
|
||
|
CREATE TABLE users (
|
||
|
id INTEGER PRIMARY KEY NOT NULL,
|
||
|
name TEXT NOT NULL,
|
||
|
password_salt BLOB NOT NULL,
|
||
|
password_hash BLOB NOT NULL,
|
||
|
admin INTEGER NOT NULL,
|
||
|
UNIQUE(name)
|
||
|
);
|
||
|
INSERT INTO users SELECT * FROM users_backup;
|
||
|
DROP TABLE users_backup;
|