2024-03-17 16:54:08 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
sqlite3 database.sqlite3 "
|
|
|
|
CREATE TABLE IF NOT EXISTS map (
|
|
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
|
|
x TEXT,
|
|
|
|
y TEXT,
|
|
|
|
occupied_by_type TEXT,
|
2024-03-20 15:29:41 -05:00
|
|
|
occupied_by_id INTEGER,
|
|
|
|
game_ref INTEGER
|
2024-03-17 16:54:08 -05:00
|
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS entity_ref (
|
|
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
|
|
entity_id INTEGER,
|
|
|
|
type TEXT,
|
|
|
|
hp INTEGER,
|
2024-03-20 15:29:41 -05:00
|
|
|
inventory_ref INTEGER,
|
|
|
|
game_ref INTEGER
|
2024-03-17 16:54:08 -05:00
|
|
|
);
|
2024-03-18 15:31:53 -05:00
|
|
|
CREATE TABLE IF NOT EXISTS player_inventory (
|
2024-03-17 16:54:08 -05:00
|
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
|
|
type TEXT,
|
|
|
|
quantity INTEGER,
|
2024-03-20 15:29:41 -05:00
|
|
|
game_ref INTEGER
|
|
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS games (
|
|
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
2024-03-21 15:16:19 -05:00
|
|
|
player_id TEXT
|
2024-03-20 15:29:41 -05:00
|
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS players (
|
|
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
2024-03-28 09:58:20 -05:00
|
|
|
player_name TEXT,
|
|
|
|
x INTEGER,
|
|
|
|
y INTEGER,
|
|
|
|
health INTEGER,
|
|
|
|
game_ref INTEGER
|
2024-03-17 16:54:08 -05:00
|
|
|
)
|
|
|
|
"
|