-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathschema.sql
7 lines (7 loc) · 1.4 KB
/
schema.sql
1
2
3
4
5
6
7
CREATE TABLE `tiles` (`id` integer NOT NULL PRIMARY KEY AUTOINCREMENT, `X` integer NOT NULL, `Y` integer NOT NULL, `colorID` integer NOT NULL, `lastModifier` varchar(255) NOT NULL, `placeTime` integer NOT NULL);
CREATE TABLE `users` (`id` integer NOT NULL PRIMARY KEY AUTOINCREMENT, `username` varchar(255) NOT NULL, `uuid` varchar(255) NOT NULL, `remainingTiles` integer NOT NULL, `tileRegenSeconds` integer NOT NULL, `totalTilesPlaced` integer NOT NULL, `lastConnected` integer NOT NULL, `availableColors` varchar(255) NOT NULL, `level` integer NOT NULL, `hasSetUsername` integer NOT NULL, `isShadowBanned` integer NOT NULL, `maxTiles` integer NOT NULL, `tilesToNextLevel` integer NOT NULL, `levelProgress` integer NOT NULL, `cl_last_event_sec` integer not null, `cl_last_event_usec` integer not null, `cl_current_allowance` real not null, `cl_max_rate` real not null, `cl_per_seconds` real not null, `tl_last_event_sec` integer not null, `tl_last_event_usec` integer not null, `tl_current_allowance` real not null, `tl_max_rate` real not null, `tl_per_seconds` real not null);
CREATE TABLE `hosts` ( `id` integer NOT NULL PRIMARY KEY AUTOINCREMENT, `ip_address` varchar(255) NOT NULL, `total_accounts` integer NOT NULL);
CREATE INDEX tile_coord_ix on tiles(X,Y);
CREATE INDEX tile_coord_ix_2 on tiles(Y,X);
CREATE INDEX host_ip_ix on hosts(ip_address);
CREATE INDEX users_uuid_ix on users(uuid);