mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 06:28:54 +00:00
Fix some problems find some others
This commit is contained in:
1 parent
8286f91061
commit
6cbabd692e
10 files changed
+54
-29
No files matched your search
@@ -1,17 +1,17 @@
|
||||
CREATE TABLE carbon_users (
|
||||
`id` UUID NOT NULL PRIMARY KEY,
|
||||
`id` BINARY(16) NOT NULL PRIMARY KEY,
|
||||
`muted` BOOLEAN,
|
||||
`deafened` BOOLEAN,
|
||||
`selectedchannel` varchar(256),
|
||||
`username` varchar(20),
|
||||
`displayname` varchar(1024),
|
||||
`lastwhispertarget` UUID,
|
||||
`whisperreplytarget` UUID,
|
||||
`lastwhispertarget` BINARY(16),
|
||||
`whisperreplytarget` BINARY(16),
|
||||
`spying` BOOLEAN
|
||||
);
|
||||
|
||||
CREATE TABLE carbon_ignores (
|
||||
`id` UUID NOT NULL,
|
||||
`ignoredplayer` UUID NOT NULL,
|
||||
`id` BINARY(16) NOT NULL,
|
||||
`ignoredplayer` BINARY(16) NOT NULL,
|
||||
PRIMARY KEY (id, ignoredplayer)
|
||||
);
|
||||
@@ -1,11 +1,11 @@
|
||||
INSERT INTO carbon_users VALUES (
|
||||
:uuid,
|
||||
UUID_TO_BIN(:id),
|
||||
:muted,
|
||||
:deafened,
|
||||
:selectedchannel,
|
||||
:username,
|
||||
:displayname,
|
||||
:lastwhispertarget,
|
||||
:whisperreplytarget,
|
||||
UUID_TO_BIN(:lastwhispertarget),
|
||||
UUID_TO_BIN(:whisperreplytarget),
|
||||
:spying
|
||||
);
|
||||
@@ -1 +1 @@
|
||||
INSERT INTO carbon_ignores (id, ignoredplayer) VALUES(:id, :name)
|
||||
INSERT INTO carbon_ignores (id, ignoredplayer) VALUES(UUID_TO_BIN(:id), :name)
|
||||
@@ -1,12 +1,12 @@
|
||||
UPDATE carbon_users
|
||||
SET
|
||||
id = :id,
|
||||
id = UUID_TO_BIN(:id),
|
||||
muted = :muted,
|
||||
deafened = :deafened,
|
||||
selectedchannel = :selectedchannel,
|
||||
username= :username,
|
||||
displayname = :displayname,
|
||||
lastwhispertarget = :lastwhispertarget,
|
||||
whisperreplytarget = :whisperreplytarget,
|
||||
lastwhispertarget = UUID_TO_BIN(:lastwhispertarget),
|
||||
whisperreplytarget = UUID_TO_BIN(:whisperreplytarget),
|
||||
spying = :spying
|
||||
WHERE id = :id;
|
||||
WHERE id = UUID_TO_BIN(:id);
|
||||
@@ -1 +1,11 @@
|
||||
SELECT * from carbon_users WHERE (id = :id);
|
||||
SELECT
|
||||
BIN_TO_UUID(id) id,
|
||||
muted,
|
||||
deafened,
|
||||
selectedchannel,
|
||||
username,
|
||||
displayname,
|
||||
UUID_TO_BIN(lastwhispertarget) lastwhispertarget,
|
||||
UUID_TO_BIN(whisperreplytarget) whisperreplytarget,
|
||||
spying
|
||||
from carbon_users WHERE (id = UUID_TO_BIN(:id));
|
||||
Reference in new issue
Block a user