15 lines
519 B
MySQL
15 lines
519 B
MySQL
|
CREATE TABLE IF NOT EXISTS guild_profiles (
|
||
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||
|
user_id INTEGER NOT NULL,
|
||
|
guild_id TEXT NOT NULL,
|
||
|
-- Himbucks-related fields
|
||
|
currency_balance INTEGER DEFAULT 0,
|
||
|
message_count INTEGER DEFAULT 0,
|
||
|
last_reward_at DATETIME,
|
||
|
-- Add other profile-related fields here as needed
|
||
|
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||
|
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||
|
FOREIGN KEY (user_id) REFERENCES users(id),
|
||
|
UNIQUE(user_id, guild_id)
|
||
|
);
|