Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db changes #370

Merged
merged 20 commits into from
May 19, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions scripts/schemaupgrade.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
alter table channels change column owner_userid owner_user_id int;
alter table channels change column topic_userid topic_user_id int;
alter table channels drop owner;
alter table channels drop topic_owner;
-- #40 renames.new is redundant
alter table renames drop new;

-- #61 rename lobby_id in logins to agent
alter table logins change column lobby_id agent;
abma marked this conversation as resolved.
Show resolved Hide resolved

-- #333 cleanup channel
-- ???
abma marked this conversation as resolved.
Show resolved Hide resolved

-- #359 uniqueness for dbuser.email
alter table user add unique(email);
abma marked this conversation as resolved.
Show resolved Hide resolved

-- #360 split last_id
silentwings marked this conversation as resolved.
Show resolved Hide resolved
update users
set last_sys_id = newdata.sysid
set last_mac_id = newdata.macid
from
(
select id,
SUBSTRING_INDEX(last_id,' ',1) sysid,
SUBSTRING_INDEX(last_id,' ',-1) macid
from users
) newdata
where
id = newdata.id;

-- 368 remove randsalt from dbuser
alter users drop randsalt
abma marked this conversation as resolved.
Show resolved Hide resolved
abma marked this conversation as resolved.
Show resolved Hide resolved