Commit Graph

39 Commits

Author SHA1 Message Date
cialloo
55c7836c67 Enhance database compatibility for rankings and statistics
- Updated SQL queries in shavit-rankings.sp to support PostgreSQL and SQLite, including handling of INSERT and REPLACE statements.
- Modified shavit-stats.sp to adapt SQL syntax based on the database driver, ensuring compatibility for playtime updates and statistics retrieval.
- Adjusted shavit-wr.sp to format time values correctly across different database systems and refined leaderboard queries.
- Enhanced shavit-zones.sp to use INSERT ON CONFLICT for PostgreSQL, maintaining compatibility with MySQL and SQLite.
- Introduced a global driver variable to manage database-specific logic throughout the scripts.
2025-07-13 10:54:05 +08:00
rtldg
b29cc54d0b Fix the Migration_MoreFirstLoginStuff queries from rtldg/sqldumb (surely.. hopefully..) 2025-05-16 07:10:04 +00:00
rtldg
158edbe158 Make firstlogin pull from old runs if possible
Some checks failed
Compile / Build SM ${{ matrix.sm-version }} (1.12) (push) Has been cancelled
Compile / Release (push) Has been cancelled
2025-04-23 23:43:25 +00:00
olivia
3d0cd96319 Add FirstLogin to database and profile (#1234)
Some checks failed
Compile / Build SM ${{ matrix.sm-version }} (1.12) (push) Has been cancelled
Compile / Release (push) Has been cancelled
fix FirstLogin query for sqlite

fix statsmenu query oopsie teehee :3

sql-create-tables-and-migrations.sp - fix queries for sqlite

Simplify firstlogin column initialization
2025-04-19 22:26:29 +00:00
rtldg
9434dc9438 edit the DeprecateExactInt sql error handling a bit for #1218 2024-10-18 04:22:13 +00:00
rtldg
e41ba9fa95 probably fix exact_time_int deprecation issue (#1218) 2024-10-02 02:44:31 +00:00
rtldg
07727e1db0 faster query for deprecate exact_time_int (and more migration logging) 2022-10-17 12:22:39 +00:00
jedso
dc2c186249 Use sqlite_master to explicitly check for id's type 2022-10-07 21:17:39 +10:30
rtldg
f0ea0a01c1
Merge branch 'master' into mapzones-rowid-fix 2022-10-06 08:26:00 +00:00
rtldg
c631f6635b add jedso to top credits 2022-10-06 08:19:19 +00:00
rtldg
9ef34bce59 Add missing users to users table 2022-10-06 08:19:01 +00:00
jedso
5f717553d9 Add SQLite statements to re-create mapzones with INTEGER PRIMARY KEY 2022-10-01 21:39:04 +09:30
jedso
119e7ff4c8 Store SQLite mapzones CREATE TABLE statement for re-use in migration 2022-10-01 21:37:24 +09:30
jedso
b0889f77ee Change mapzones CREATE TABLE for SQLite to use INTEGER PRIMARY KEY 2022-10-01 21:36:45 +09:30
jedso
e196e04de6 Add query to check for NULL SQLite id row in mapzones 2022-10-01 21:34:28 +09:30
rtldg
de9cbc8470
Merge branch 'master' into playertimes_fk 2022-09-29 06:19:40 +00:00
rtldg
2b2a1fcb12 queue migrations slightly better to handle multiple queries (relevant to #1176) 2022-09-29 06:17:33 +00:00
jedso
098b7d4977 Add SQLite statements to re-create playertimes with FK constraint 2022-09-26 23:08:12 +09:30
jedso
d718620aa3 Store SQLite playertimes CREATE TABLE statement for re-use in migration 2022-09-26 23:08:12 +09:30
jedso
a1b04e38ba Change playertimes CREATE TABLE statement to include FK constraint 2022-09-26 23:08:12 +09:30
jedso
23901be52d Add MySQL ALTER TABLE queries to drop and/or add auth FK constraint 2022-09-26 23:08:12 +09:30
jedso
3cef031e91 Add initial migration queries for MySQL/SQLite 2022-09-26 23:08:05 +09:30
rtldg
894b039e4e deprecate exact_time_int 2022-09-24 05:45:01 +00:00
rtldg
6dc1fb66e4 split mapzones form & target migration for sqlite 2022-06-28 19:23:39 +00:00
rtldg
4486528880 preliminary postgresql support 2022-06-23 09:10:22 +00:00
rtldg
0f44dd1710 add shavit_core_log_sql & remove Database2/Transaction2 methmodmaps 2022-06-13 06:28:46 +00:00
rtldg
fa6ccdbded make sqlite run migrations automatically too 2022-06-13 05:46:10 +00:00
rtldg
e3aac2d24e
zones wip (#1143)
* backup a lot of this zone_cache_t stuff since i'm going to do something else first

* AAAAAAAAAAAAAA

* add the sTarget checking

* this pr will get squashed so this message doesn't matter

* wip Shavit_RemoveZone

* wip ZF_Solid and TODO notes

* move hook thing

* do some zone insert stuff that doesn't reload *every* zone

* condense some zone editing global variables

* add some spaces to some ifs

* remove gV_MapZones

* remove random loop

* big change

* remove ClearZone()

* .

* ..

* add speed to zone beam settings

* add bhop_n0bs1_css stripper cfg for shit zone

* ...

* remove draw timer to OnConfigsExecuted because interval cvar

* change string for mapfixes print

* wew

* rename iSource to iForm and add sSource

* add Shavit_ReloadZones() and rename some source things

* add shavit-zones-http.sp

* add a getarray

* adjust the http api format slightly

* remove Shavit_GetStageZone() & fix zone inserts

* api update

* convar edits

* increase buf size

* wrong buf...

* normalize points inside Shavit_AddZone

* rename ZonesNotLocal to ZonesNotSQL

* small cleanup

* add the zone hooking menu stuff

* make the confirm menu Exit button STOP DRAWING!!!

* only try to draw trigger_multiples

* asdf

* typo

* improvements

* add distance to menu

* use PassesTriggerFilters like rngfix

* finish some docs

* make dist be meters

* more hooking tele things

* remove all this migration stuff

* add entity under crosshair

* shorten stage translation message
2022-06-12 14:43:16 +00:00
rtldg
ef3ca621c4 add more contributors & copyright attributions. mostly done via git blame but also it's also likely i missed some people. 2022-05-25 11:43:57 +00:00
rtldg
ad258dc047 fix table name array and move around 2022-04-02 12:40:46 +00:00
rtldg
22c9e50ed7 remove some warnings & TODOs 2022-02-09 22:28:16 +00:00
rtldg
7a11acf2e6 remove points_calced_from since it should only update on wr now so it's unnecessary 2022-01-19 09:41:01 +00:00
BoomShotKapow
3348e54316 SourceMod 1.11 dev changes & Query -> Query2 2022-01-01 10:12:53 +00:00
rtldg
64414f61e0 misc sql changes 2021-11-08 15:29:34 +00:00
rtldg
184f157c25 make the AFTER sql stuff only happen on mysql 2021-10-25 13:04:18 +00:00
rtldg
af48f2d695 add note about adding more migrations to alter table to fix column order (for faster queries) 2021-10-10 07:51:41 +00:00
rtldg
41882d3465 reorganize playertimes columns (in create table). speed up point recalculation by inlining things where possible and caching wr last calculated against. 2021-10-10 07:50:45 +00:00
rtldg
60c614df9d add points_calced_from 2021-10-10 06:12:51 +00:00
rtldg
7ca863f04b move sql table creation and migrations 2021-10-10 05:14:37 +00:00