Created world-dropping SQL code.
Signed-off by: Gergely POLONKAI <polesz@w00d5t0ck.info>
This commit is contained in:
		
							
								
								
									
										8
									
								
								create-world.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										8
									
								
								create-world.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| #! /bin/bash | ||||
|  | ||||
| sqlite3 iminiru.db < sql/planes.sql | ||||
| sqlite3 iminiru.db < sql/planets.sql | ||||
| sqlite3 iminiru.db < sql/rooms.sql | ||||
|  | ||||
| sqlite3 iminiru.db < iminiru/data.sql | ||||
|  | ||||
							
								
								
									
										3
									
								
								drop-world.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										3
									
								
								drop-world.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| #! /bin/bash | ||||
|  | ||||
| sqlite3 iminiru.db < sql/drop-world.sql | ||||
							
								
								
									
										10
									
								
								sql/drop-world.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								sql/drop-world.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | ||||
| -- This SQL script drops all world related tables. | ||||
| -- Please never drop non-world tables, like players from here! | ||||
|  | ||||
| DROP TABLE planet_planes; | ||||
| DROP TABLE planets; | ||||
| DROP TABLE planes; | ||||
| DROP TABLE room_exits; | ||||
| DROP TABLE rooms; | ||||
| DROP TABLE areas; | ||||
| DROP TABLE directions; | ||||
| @@ -1,3 +1,6 @@ | ||||
| -- Okay, so you update this file. But if you create a table, don't forget to | ||||
| -- update drop.sql, either! | ||||
|  | ||||
| CREATE TABLE planes ( | ||||
| 	id integer primary key, | ||||
| 	name varchar(40) not null unique | ||||
|   | ||||
| @@ -1,3 +1,6 @@ | ||||
| -- Okay, so you update this file. But if you create a table, don't forget to | ||||
| -- update drop.sql, either! | ||||
|  | ||||
| CREATE TABLE planets ( | ||||
| 	id integer NOT NULL PRIMARY KEY, | ||||
| 	name varchar(40) NOT NULL UNIQUE | ||||
|   | ||||
| @@ -1,3 +1,6 @@ | ||||
| -- Okay, so you update this file. But if you create a table, don't forget to | ||||
| -- update drop.sql, either! | ||||
|  | ||||
| CREATE TABLE directions ( | ||||
| 	id integer NOT NULL PRIMARY KEY, | ||||
| 	short_name varchar(2) NOT NULL UNIQUE, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user