Skip to content
rolevax edited this page Mar 12, 2017 · 2 revisions

Database Schema

Meta

Using a MySQL implemented by MariaDB. Output of mysql --version on the server:

mysql  Ver 15.1 Distrib 10.0.28-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

The DB name, username, and password are temporarily hard coded in dao.go.

Table "Users"

create table users (
    user_id int unsigned primary key not null auto_increment,
    username varchar(16) not null unique,
    password char(44) not null,
    level int(2) unsigned not null default 0,
    pt int(4) unsigned not null default 0,
    rating float(8,3) not null default 1500.0,
    rank1 int unsigned not null default 0,
    rank2 int unsigned not null default 0,
    rank3 int unsigned not null default 0,
    rank4 int unsigned not null default 0
);

Table "Girls"

create table girls (
    girl_id int primary key,
    level ...,
    pt ...,
    rating ...,
    rank1 ...,
    rank2 ...,
    rank3 ...,
    rank4 ...,
);

Types of pt, level, etc. are same as users.

  • Passwords are stored and transferred in base64-encoded SHA-256 values.

Clone this wiki locally