summaryrefslogtreecommitdiff
path: root/src/sql/sqlite
diff options
context:
space:
mode:
Diffstat (limited to 'src/sql/sqlite')
-rw-r--r--src/sql/sqlite/createTables.sql1
-rw-r--r--src/sql/sqlite/updates/update_13_to_14.sql10
2 files changed, 11 insertions, 0 deletions
diff --git a/src/sql/sqlite/createTables.sql b/src/sql/sqlite/createTables.sql
index 3ab59d76..8296a7e2 100644
--- a/src/sql/sqlite/createTables.sql
+++ b/src/sql/sqlite/createTables.sql
@@ -55,6 +55,7 @@ CREATE TABLE mana_characters
x INTEGER NOT NULL,
y INTEGER NOT NULL,
map_id INTEGER NOT NULL,
+ slot INTEGER NOT NULL,
--
FOREIGN KEY (user_id) REFERENCES mana_accounts(id)
);
diff --git a/src/sql/sqlite/updates/update_13_to_14.sql b/src/sql/sqlite/updates/update_13_to_14.sql
new file mode 100644
index 00000000..a4c4a38a
--- /dev/null
+++ b/src/sql/sqlite/updates/update_13_to_14.sql
@@ -0,0 +1,10 @@
+
+-- Add the slot column to table mana_characters
+ALTER TABLE mana_characters ADD slot INTEGER NOT NULL;
+
+-- Update the database version, and set date of update
+UPDATE mana_world_states
+ SET value = '14',
+ moddate = strftime('%s','now')
+ WHERE state_name = 'database_version';
+