39 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			SQL
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			SQL
		
	
	
	
	
	
| 
 | |
| --main table
 | |
| CREATE TABLE mainTable (propName VARCHAR PRIMARY KEY, propValue VARCHAR);
 | |
| INSERT INTO mainTable (propName, propValue) VALUES ("ver","1");
 | |
| 
 | |
| --characters
 | |
| --positions
 | |
| CREATE TABLE charaWorldPositions (id INTEGER PRIMARY KEY, charID INTEGER, posX INTEGER, posY INTEGER);
 | |
| CREATE INDEX charaWorldPositionsIDIndex ON charaWorldPositions (charID);
 | |
| CREATE INDEX charaWorldPositionsPosIndex ON charaWorldPositions (posX, posY);
 | |
| 
 | |
| --data
 | |
| CREATE TABLE charaData (id INTEGER PRIMARY KEY, charID INTEGER, dataVal VARCHAR);
 | |
| CREATE INDEX charaDataIDIndex ON charaData (charID);
 | |
| 
 | |
| 
 | |
| 
 | |
| --towns
 | |
| --positions
 | |
| CREATE TABLE townWorldPositions (id INTEGER PRIMARY KEY, townID INTEGER, posX INTEGER, posY INTEGER);
 | |
| CREATE INDEX townWorldPositionsIDIndex ON townWorldPositions (townID);
 | |
| CREATE INDEX townWorldPositionsPosIndex ON townWorldPositions (posX, posY);
 | |
| 
 | |
| --data
 | |
| CREATE TABLE townData (id INTEGER PRIMARY KEY, townID INTEGER, dataVal VARCHAR);
 | |
| CREATE INDEX townDataIDIndex ON townData (townID);
 | |
| 
 | |
| 
 | |
| --structures
 | |
| --positions
 | |
| CREATE TABLE structWorldPositions (id INTEGER PRIMARY KEY, structID INTEGER, posX INTEGER, posY INTEGER);
 | |
| CREATE INDEX structWorldPositionsIDIndex ON structWorldPositions (structID);
 | |
| CREATE INDEX structWorldPositionsPosIndex ON structWorldPositions (posX, posY);
 | |
| 
 | |
| --data
 | |
| CREATE TABLE structData (id INTEGER PRIMARY KEY, structID INTEGER, dataVal VARCHAR);
 | |
| CREATE INDEX structDataIDIndex ON structData (structID);
 | |
| 
 |