summaryrefslogtreecommitdiff
path: root/src/sql/sqlite
diff options
context:
space:
mode:
Diffstat (limited to 'src/sql/sqlite')
-rw-r--r--src/sql/sqlite/createTables.sql14
-rw-r--r--src/sql/sqlite/updates/update_16_to_17.sql16
2 files changed, 29 insertions, 1 deletions
diff --git a/src/sql/sqlite/createTables.sql b/src/sql/sqlite/createTables.sql
index f353b8e1..2d7360da 100644
--- a/src/sql/sqlite/createTables.sql
+++ b/src/sql/sqlite/createTables.sql
@@ -173,6 +173,18 @@ CREATE INDEX mana_item_attributes_item ON mana_item_attributes ( item_id );
-----------------------------------------------------------------------------
+CREATE TABLE mana_floor_items
+(
+ id INTEGER PRIMARY KEY,
+ map_id INTEGER NOT NULL,
+ item_id INTEGER NOT NULL,
+ amount INTEGER NOT NULL,
+ pos_x INTEGER NOT NULL,
+ pos_y INTEGER NOT NULL
+);
+
+-----------------------------------------------------------------------------
+
CREATE TABLE mana_char_equips
(
id INTEGER PRIMARY KEY,
@@ -407,7 +419,7 @@ AS
INSERT INTO mana_world_states VALUES('accountserver_startup',NULL,NULL, strftime('%s','now'));
INSERT INTO mana_world_states VALUES('accountserver_version',NULL,NULL, strftime('%s','now'));
-INSERT INTO mana_world_states VALUES('database_version', NULL,'16', strftime('%s','now'));
+INSERT INTO mana_world_states VALUES('database_version', NULL,'17', strftime('%s','now'));
-- all known transaction codes
diff --git a/src/sql/sqlite/updates/update_16_to_17.sql b/src/sql/sqlite/updates/update_16_to_17.sql
new file mode 100644
index 00000000..769c26da
--- /dev/null
+++ b/src/sql/sqlite/updates/update_16_to_17.sql
@@ -0,0 +1,16 @@
+-- Create the new floor item table
+CREATE TABLE mana_floor_items
+(
+ id INTEGER PRIMARY KEY,
+ map_id INTEGER NOT NULL,
+ item_id INTEGER NOT NULL,
+ amount INTEGER NOT NULL,
+ pos_x INTEGER NOT NULL,
+ pos_y INTEGER NOT NULL
+);
+
+-- Update the database version, and set date of update
+UPDATE mana_world_states
+ SET value = '17',
+ moddate = strftime('%s','now')
+ WHERE state_name = 'database_version';