sword_game/schema.sql

13 lines
416 B
SQL

CREATE DATABASE IF NOT EXISTS socket_server;
USE socket_server;
CREATE TABLE IF NOT EXISTS users (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(32) UNIQUE NOT NULL,
gold BIGINT UNSIGNED DEFAULT 10000,
sword_level INT DEFAULT 0,
max_sword_level INT DEFAULT 0,
last_login TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
INDEX (gold),
INDEX (max_sword_level)
);