1
Fork 0
mirror of https://github.com/wlinator/luminara.git synced 2024-10-02 18:23:12 +00:00

Change database tables

This commit is contained in:
wlinator 2024-03-03 19:53:43 +01:00
parent d594eccc0f
commit e083dea9bb
3 changed files with 50 additions and 45 deletions

View file

@ -1,62 +1,60 @@
SET FOREIGN_KEY_CHECKS=0;
CREATE TABLE xp (
user_id BIGINT PRIMARY KEY NOT NULL,
user_xp INT NOT NULL,
user_level INT NOT NULL,
cooldown DECIMAL(15,2)
user_id BIGINT NOT NULL,
guild_id BIGINT NOT NULL,
xp INT NOT NULL,
cooldown DECIMAL(15,2),
PRIMARY KEY (user_id, guild_id)
);
CREATE TABLE currency (
user_id BIGINT PRIMARY KEY NOT NULL,
cash_balance BIGINT NOT NULL,
special_balance BIGINT
user_id BIGINT NOT NULL,
balance BIGINT NOT NULL,
PRIMARY KEY (user_id)
);
CREATE TABLE stats_bj (
id INT PRIMARY KEY AUTO_INCREMENT,
CREATE TABLE blackjack (
id INT AUTO_INCREMENT,
user_id BIGINT,
is_won BOOLEAN,
bet BIGINT,
payout BIGINT,
hand_player TEXT,
hand_dealer TEXT
hand_dealer TEXT,
PRIMARY KEY (id)
);
CREATE TABLE stats_slots (
id INT PRIMARY KEY AUTO_INCREMENT,
CREATE TABLE slots (
id INT AUTO_INCREMENT,
user_id BIGINT,
is_won BOOLEAN,
bet BIGINT,
payout BIGINT,
spin_type TEXT,
icons TEXT
);
CREATE TABLE stats_duel (
id INT PRIMARY KEY AUTO_INCREMENT,
user_id BIGINT,
is_won BOOLEAN,
bet BIGINT
icons TEXT,
PRIMARY KEY (id)
);
CREATE TABLE dailies (
id INT PRIMARY KEY AUTO_INCREMENT,
id INT AUTO_INCREMENT,
user_id BIGINT,
amount BIGINT,
claimed_at TINYTEXT,
streak INT
streak INT,
PRIMARY KEY (id)
);
CREATE TABLE item (
id INT PRIMARY KEY AUTO_INCREMENT,
id INT AUTO_INCREMENT,
name TEXT,
display_name TEXT,
description TEXT,
image_url TEXT,
emote_id BIGINT,
quote TEXT,
type TEXT
type TEXT,
PRIMARY KEY (id)
);
CREATE TABLE inventory (
@ -68,15 +66,22 @@ CREATE TABLE inventory (
FOREIGN KEY (item_id) REFERENCES item (id)
);
CREATE TABLE ShopItem (
item_id INT PRIMARY KEY,
price BIGINT,
price_special BIGINT,
worth BIGINT,
description TEXT
CREATE TABLE birthdays (
user_id BIGINT NOT NULL,
guild_id BIGINT NOT NULL,
birthday DATETIME DEFAULT NULL,
PRIMARY KEY (user_id, guild_id)
);
CREATE TABLE birthdays (
user_id BIGINT NOT NULL PRIMARY KEY,
birthday DATETIME DEFAULT NULL
);
CREATE TABLE guild_config (
guild_id BIGINT NOT NULL,
birthday_channel_id BIGINT,
command_channel_id BIGINT, /* NULL: users can do XP & Currency commands everywhere. */
intro_channel_id BIGINT,
welcome_channel_id BIGINT,
level_channel_id BIGINT, /* level-up messages, if NULL the level-up message will be shown in current msg channel*/
level_message TEXT, /* if NOT NULL and LEVEL_TYPE = 2, this can be a custom level up message. */
level_message_type TINYINT(1) NOT NULL DEFAULT 1, /* 0: no level up messages, 1: levels.en-US.json, 2: generic message */
PRIMARY KEY (guild_id)
)

View file

@ -1,5 +1,5 @@
REPLACE INTO item
(id, name, display_name, description, image_url, emote_id, quote, type)
(name, display_name, description, image_url, emote_id, quote, type)
VALUES (
"apple",
"apple",
@ -8,10 +8,10 @@ VALUES (
1121491265658306692,
"The rarest item in Racu, you literally can't get this.",
"collectible"
)
);
REPLACE INTO item
(id, name, display_name, description, image_url, emote_id, quote, type)
(name, display_name, description, image_url, emote_id, quote, type)
VALUES (
"tester_badge",
"tester badge",
@ -20,10 +20,10 @@ VALUES (
1121491902370418869,
"Thank you for the support <3",
"badge"
)
);
REPLACE INTO item
(id, name, display_name, description, image_url, emote_id, quote, type)
(name, display_name, description, image_url, emote_id, quote, type)
VALUES (
"bitch_coin",
"bitchcoin",
@ -32,10 +32,10 @@ VALUES (
1124044941702733925,
"You may still be bitchless but at least you have this coin.",
"collectible"
)
);
REPLACE INTO item
(id, name, display_name, description, image_url, emote_id, quote, type)
(name, display_name, description, image_url, emote_id, quote, type)
VALUES (
"rave_coin",
"ravecoin",
@ -44,10 +44,10 @@ VALUES (
1125357545180110878,
"IT'S OVER 9000!!!",
"collectible"
)
);
REPLACE INTO item
(id, name, display_name, description, image_url, emote_id, quote, type)
(name, display_name, description, image_url, emote_id, quote, type)
VALUES (
"admin_badge",
"admin badge",
@ -56,4 +56,4 @@ VALUES (
1125371605485371442,
"admin_bagde",
"badge"
)
);

View file

@ -50,7 +50,7 @@ def setup_logger():
# CONSOLE HANDLER
console_handler = logging.StreamHandler()
console_handler.setLevel(logging.INFO)
console_handler.setLevel(logging.DEBUG)
console_formatter = RacuFormatter('[%(asctime)s] [%(name)s] %(message)s',
datefmt='%Y-%m-%d %H:%M:%S')