This repository has been archived on 2024-05-18. You can view files and clone it, but cannot push or open issues or pull requests.
steamServer/migrations/1_create_tables.up.sql

28 lines
650 B
MySQL
Raw Normal View History

CREATE TABLE regions (
2021-09-20 14:57:24 +02:00
id UUID PRIMARY KEY,
name TEXT NOT NULL
2021-09-20 14:57:24 +02:00
);
CREATE TABLE gamemodes (
2021-09-20 14:57:24 +02:00
id UUID PRIMARY KEY,
name TEXT NOT NULL
);
2021-09-23 15:58:56 +02:00
CREATE TABLE flags (
server_ip TEXT PRIMARY KEY,
flag VARCHAR(2) NULL DEFAULT NULL,
);
CREATE TABLE servers (
2021-09-20 14:57:24 +02:00
id UUID PRIMARY KEY,
region_id UUID NOT NULL REFERENCES regions(id) ON DELETE CASCADE,
gamemode_id UUID NOT NULL REFERENCES gamemodes(id) ON DELETE CASCADE,
2021-09-23 15:58:56 +02:00
server_id UUID NOT NULL REFERENCES flags(server_ip) ON DELETE CASCADE,
app_id INT NOT NULL,
server_ip TEXT NOT NULL,
2021-09-20 14:57:24 +02:00
name TEXT NOT NULL,
map TEXT NOT NULL,
players INT,
max_players INT
2021-09-20 14:57:24 +02:00
);