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

20 lines
456 B
SQL

CREATE TABLE regions (
id UUID PRIMARY KEY,
name TEXT NOT NULL
);
CREATE TABLE gamemodes (
id UUID PRIMARY KEY,
name TEXT NOT NULL
);
CREATE TABLE servers (
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,
app_id INT NOT NULL,
name TEXT NOT NULL,
map TEXT NOT NULL,
players INT,
max_players INT
);