Skip to content

Commit

Permalink
Added migration to 1.0.1 version
Browse files Browse the repository at this point in the history
  • Loading branch information
Theggv committed Apr 24, 2022
1 parent 26beb0c commit de54339
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
4 changes: 4 additions & 0 deletions migrations/base.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- VERSION 1.0.1
ALTER TABLE `kz_savedruns` ADD `lastvel_x` int(11) NOT NULL DEFAULT 0;
ALTER TABLE `kz_savedruns` ADD `lastvel_y` int(11) NOT NULL DEFAULT 0;
ALTER TABLE `kz_savedruns` ADD `lastvel_z` int(11) NOT NULL DEFAULT 0;
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kreedz-amxx",
"version": "1.0.0",
"version": "1.0.1",
"author": "ggv",
"description": "Kreedz AMXX",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/scripts/kreedz/kz_sql_core.sma
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <kreedz_api>
#include <kreedz_sql>


#define PLUGIN "[Kreedz] Sql Core"
#define VERSION __DATE__
#define AUTHOR "ggv"
Expand Down Expand Up @@ -196,10 +197,10 @@ public init_tables()
`lastcp_x` int(11) NOT NULL DEFAULT 0,\
`lastcp_y` int(11) NOT NULL DEFAULT 0,\
`lastcp_z` int(11) NOT NULL DEFAULT 0,\
`weapon` int(11) NOT NULL DEFAULT 6,\
`lastvel_x` int(11) NOT NULL DEFAULT 0,\
`lastvel_y` int(11) NOT NULL DEFAULT 0,\
`lastvel_z` int(11) NOT NULL DEFAULT 0,\
`weapon` int(11) NOT NULL DEFAULT 6,\
FOREIGN KEY (uid) REFERENCES kz_uid(id)\
ON DELETE CASCADE \
ON UPDATE CASCADE,\
Expand Down
6 changes: 4 additions & 2 deletions src/scripts/kreedz/kz_sql_savepos.sma
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ SavePos(id)
(`uid`, `mapid`, `time`, `cp`, `tp`, \
`pos_x`, `pos_y`, `pos_z`, \
`lastcp_x`, `lastcp_y`, `lastcp_z`, \
`lastvel_x`, `lastvel_y`, `lastvel_z`, `weapon`) \
`weapon`, \
`lastvel_x`, `lastvel_y`, `lastvel_z`) \
\
VALUES (%d, %d, %d, %d, %d, \
%d, %d, %d, \
Expand All @@ -268,7 +269,8 @@ SavePos(id)
kz_get_actual_time(id), kz_get_cp_num(id), kz_get_tp_num(id),
iLastPos[0], iLastPos[1], iLastPos[2],
iLastCp[0], iLastCp[1], iLastCp[2],
iLastVel[0], iLastVel[1], iLastVel[2], kz_get_min_rank(id)
kz_get_min_rank(id),
iLastVel[0], iLastVel[1], iLastVel[2]
);


Expand Down

0 comments on commit de54339

Please sign in to comment.