Commit graph

28 commits

Author SHA1 Message Date
14d5965caa
god dammit 2022-12-12 11:36:08 -06:00
samhza
ed25116851
Assorted db changes (#333)
* postgres: use transaction-scoped sql for upgrade

* database: combine fixGuild and addGuild into getGuild

* postgres, sqlite: simplify upgrade()

* allow running commands in DMs without prefix

this functionality was broken in
16095c0256 but is now fixed

* allow running esmBot without a database

Before this change, the only way to run esmBot without a database is to use the
dummy database driver which is broken but fails silently. THis can lead to a
confusing user experience. For instance, using `&command disable` with the
dummy database driver will tell you that the command has been disabled even
though it has not been.

This change adds support for running esmBot with no database driver by leaving
the DB= config option empty, and explicitly telling the user that some
functionality is now unavailable rather than failing silently like the dummy
driver.

* remove dummy database driver
2022-12-12 11:15:10 -06:00
samhza
c00d518f6e
simplify postgres and sqlite database initialization, remove psqlinit.sh (#331)
Before this change, uninitialized databases would be initialized with the old
schema and then migrated to the latest version. After this change, unintialized
databases are initizialized with the latest database schema immediately, without
having to run any of the migrations. This change has no effect on existing
databases.

Before this change, Postgres database initialization was done manually using
utils/psqlinit.sh. This is inconsistent with SQLite, which the bot initializes
itself. It also requires shell access to the server running the Postgres
instance, which means it cannot be used on managed Postgres instances. After
this change, the bot initializes Postgres databases as it does with SQLite, and
utils/psqlinit.sh has been removed as it is now unecessary.
2022-11-26 15:31:00 -06:00
fa3d7b3772
Fix PostgreSQL broadcast column upgrade, make some changes to followup message handling 2022-10-30 00:17:36 -05:00
5d679dbb7a
Make broadcasts persistent, fix Postgres database upgrades, fix image slash commands with text not working in DMs 2022-10-25 12:37:55 -05:00
3662a2e51d
Refactor message prefix handling, lessen reliance on member caching, fix adding guilds in postgresql 2022-10-23 20:27:32 -05:00
cee458cef1
Fix sqlite guild registration, fix starting status 2022-09-28 23:11:05 -05:00
888f2f8b4a
Initial Oceanic port (still unfinished), update packages, remove serverinfo and userinfo 2022-09-23 22:25:16 -05:00
121615df63
Replace pg with postgres, add swirl alias, await ping edit, added debug scripts to package.json 2022-09-12 16:45:32 -05:00
86f6811e6e
Fix message command counts 2022-09-10 17:51:00 -05:00
969869e4ab
probably should not be doing this 2022-03-01 09:49:36 -06:00
bc9eb12b5a
Move database migration, removed guild modified times, added XM plugin to lavalink config 2022-02-21 18:55:25 -06:00
c568423870
Added support for database updates/migration, added guild access timestamps 2022-02-18 23:05:41 -06:00
fd77ace48e
Added node version check, some cleanup 2022-01-07 11:44:18 -06:00
ae2ebe0337
Port to ESM modules (haha funny), removed cache request, many other changes that I forgot about 2021-08-19 09:19:14 -05:00
382480e1c7
Fixed issue with pagination message 2021-08-14 16:15:21 -05:00
5e8c587c41
Improved tag retrieval, blacklisted a ton of events, fixed skip issue for real 2021-08-14 08:00:16 -05:00
9f36a79a2b
Added command, reverted database service split 2021-08-12 22:28:09 -05:00
5c0cb6463a
Some more small DB optimizations 2021-08-11 16:54:43 -05:00
a75ceb41f2
Move tags to separate table 2021-08-10 20:25:29 -05:00
81277f95c0
Add query timeout to postgres 2021-08-10 18:35:26 -05:00
cd469667cb
yeah 2021-08-09 10:48:43 -05:00
899d4ac9da
missed a spot again 2021-08-09 10:18:00 -05:00
253bd4c71c
Postgres query optimization attempt 2021-08-09 10:12:48 -05:00
714e4a451c
Fixed databasenot properly caching disabled channels 2021-07-01 08:01:00 -05:00
ae8b121d03
Added server/user count to stats, fixed message not showing on tenor/large image errors 2021-06-29 14:10:22 -05:00
e5d9388952 Added command counts to Prometheus metrics 2021-05-03 08:49:55 -05:00
cc82d32840 Fixed slow, changed clean to handle all env variables, changed database handling 2021-04-14 16:37:40 -05:00
Renamed from utils/database/postgres.js (Browse further)