121 Commits

Author SHA1 Message Date
Stefan Strigler 5721f77d5a fix: set overuse limits
This is an effort to detect abuse where accounts get created to create more
invites (invite chaining) and so on.
2026-03-06 17:11:09 +01:00
badlop 1bcd52300f Merge pull request #4512 from sstrigler/roster-pre-approval
Roster Subscription Pre-Approval
2026-02-24 16:00:42 +01:00
Stefan Strigler 47d898bb8b add support for roster pre-approval
Implementation of RFC 6121 section 3.4: Pre-Approving a Subscription Request
https://datatracker.ietf.org/doc/html/rfc6121#section-3.4
2026-01-30 10:36:38 +01:00
Stefan Strigler d0437ab19a fix stale comma 2026-01-30 08:18:24 +01:00
Pawel Chmielowski 0bb0dcc6b1 Make mod_invites sql schema compatible with mysql<8 2026-01-19 20:29:17 +01:00
Stefan Strigler 480c6e0995 add support for 'great invitations' as mod_invites 2026-01-19 17:03:42 +01:00
Metalhearf 5f94b5252b Update copyright year to 2026 2026-01-05 12:22:57 +01:00
Bruno MATEU c93ea2c22f missing comma in postgres schema 2025-07-07 08:28:23 +02:00
Paweł Chmielowski d65cafae64 Update code for switching to new schema type to users table changes 2025-05-12 18:47:18 +02:00
Badlop 7167df7979 mysql.sql: Fix typo in commit 7862c6a when creating users table 2025-04-22 12:25:04 +02:00
Paweł Chmielowski 7862c6a7db Add support for storing multiple passwords formats per user
This adds option 'auth_stored_password_types' that can be used to setup
storage of multiple passwords for each user. When this is set, on each
password set, database will now store password in each format specified.
2025-03-26 11:03:39 +01:00
Badlop 8ebbb45a19 Update copyright year to 2025 (#4139) 2025-01-03 11:49:37 +01:00
Paweł Chmielowski 4e35515a8c Also change mysql.new.sql in similar way 2024-07-18 17:55:37 +02:00
Paweł Chmielowski d2a3fe3ed2 Fix column type in comment with schema update 2024-07-18 17:13:45 +02:00
haha 93cdee80ed [fix] fix mysql.sql archive origin_id 2024-07-18 15:14:39 +08:00
Badlop 589521bfd8 Update copyright year to 2024 (#4139) 2024-01-22 17:29:13 +01:00
Alexey Shchepin 97568195d6 Update SQL schema files 2023-12-27 17:01:57 +03:00
Badlop 66d58504d0 Fix TSQLlint warning about typo in mssql.new.sql 2023-02-21 18:16:59 +01:00
Stu Tomlinson 0c1cf43519 Fix a long standing bug in new schema migration
... and make the test that uncovered it explicitly fail (there was already a
TODO) instead of passing but with errors logged
2023-01-21 15:42:43 +00:00
Stu Tomlinson 4f0e426a12 Change PostgreSQL SERIAL to BIGSERIAL columns
This is consistent with other schemas, internally consistent with
foreign keys, and allows for > 2B records in these tables.
2023-01-19 23:36:42 +00:00
Stu Tomlinson d5bf051e79 Fix minor SQL schema inconsistencies 2023-01-19 23:36:42 +00:00
Stu Tomlinson f7f0d3b1fb Enable MySQL support for new schema migration 2023-01-19 23:36:42 +00:00
Stu Tomlinson aeed1679d8 Add 'new' schema for MS SQL 2023-01-19 23:36:42 +00:00
Stu Tomlinson 06ffe995e1 Remove unnecessary indexes
For columns are already included in a compound index there is no
benefit to having a separate index with a subset of the same columns in
the same order, it just wastes space.
2023-01-19 23:36:42 +00:00
Stu Tomlinson 93bf4d5411 New SQL schema migrate fix
'server_host' column on 'route' table already exists in old schema and
does not need adding for new schema migration.
2023-01-19 23:36:42 +00:00
Stu Tomlinson 5e94fdcfd5 MS SQL schema fixes
* Add missing 'mix' tables and indexes

* Fix text vs varchar issues

Various tests triggered this error:
The data types text and varchar are incompatible in the equal to operator.

Caused by incompatible 'text' columns in muc_online_room,
muc_online_users, pubsub_node_option, and pubsub_node tables.

* Fix definition of mqtt_pub table

This table incorrectly included 'server_host' column in old schema, and
had other inconsistencies.
2023-01-19 23:35:05 +00:00
Badlop 243697e25a Update copyright year to 2023 (#3967) 2023-01-10 13:52:04 +01:00
Stu Tomlinson dca49f508f Sync old-to-new schema script with reality (#3790)
Update the update_sql function to match current "new" sql schema
2022-03-08 13:56:27 +01:00
Paweł Chmielowski b88fda9494 Fix sqlite schema 2022-02-18 16:24:34 +01:00
Paweł Chmielowski f86055378d Optimize room_unused_* commands
Previously to check if hibernated room was old enough we had to fetch info
about all rooms from database. Now we repurpose created_at field in sql
to store that info, that allow us to have more efficient query just for it.
2022-02-18 14:02:04 +01:00
Badlop b3211b1f71 Update copyright year to 2022 2022-02-11 09:39:25 +01:00
Badlop 3b30d5b0ed Fix support for MSSQL testing 2022-02-03 18:21:49 +01:00
Alexey Shchepin 8b7da70b57 Handle user removal in mod_muc 2021-12-14 09:55:55 +03:00
Badlop d3aa329769 Fix vcard_search definition in pgsql new schema (thanks to Stu Tomlinson)(#3695)
How to update an existing database:
ALTER TABLE vcard_search DROP CONSTRAINT vcard_search_pkey;
ALTER TABLE vcard_search ADD PRIMARY KEY (server_host, lusername);
2021-10-14 15:28:00 +02:00
Badlop dd359a7328 Add indexes from 95fa43aa to the old-to-new MySQL schema update script 2021-09-27 16:33:23 +02:00
badlop 545a2f0097 Merge pull request #3656 from pitchum/master
Add missing pgsql migration for table push_session
2021-08-16 12:47:45 +02:00
Badlop aefc374317 Fix typo when creating index (thanks to Millesimus)
Reference: https://github.com/processone/ejabberd/commit/95fa43aa96514b7e8b77fa7c29d2c0b5b1c1331a#r54157330
2021-08-05 13:52:38 +02:00
pitchum 76c49f314f Add missing SQL migration for table push_session 2021-08-01 09:53:07 +02:00
Badlop c2d8bc7b2f Add mqtt_pub table definition for MSSQL (#3097) 2021-06-14 12:22:21 +02:00
Nikat 7b33499811 MySQL Backend Patch for scram-sha512 (#3582)
* Update mysql.new.sql

scram-sha512 does not work, because serverkey is longer, then that array. All passwords was unhashed.

* Update mysql.sql
2021-05-20 13:32:50 +02:00
Paweł Chmielowski 95fa43aa96 Add missing indexes to sql sr_group tables 2021-05-18 18:29:32 +02:00
Divine 22d76bd1a4 Fix specified key was too long (#3513)
* Fix specified key was too long

This adds the correct engine and sets it to utf8mb4 collate. Prevents "Specified key was too long; max key length is 1000 bytes" from happening.

* Make two import SQL files consistent 

As suggested by @prefiks
2021-02-01 22:50:33 +01:00
Badlop 6e0161470e Update newest copyright year to 2021 (#3464) 2021-01-27 17:02:06 +01:00
Paweł Chmielowski d9588feae5 Add sql script to migrate mysql from old schema to new 2021-01-07 13:54:53 +01:00
Jérôme Sautret b02506eaaf Merge pull request #3132 from area-42/publisher_mssql_text_to_varchar
change PubSub publisher from text to varchar for mssql
2020-04-10 16:20:43 +02:00
Mickaël Rémond 3947e64524 Merge pull request #3127 from area-42/allow_emojis_with_mssql
allow storage of emojis in archive on mssql
2020-02-20 16:28:24 +01:00
Paweł Chmielowski 87ea71c3c9 Add missing oauth_client table declaration in lite.new.sql 2020-01-31 16:06:27 +01:00
Badlop 2d32c66fd7 Update copyright to 2020 (#3149) 2020-01-28 15:49:23 +01:00
Christoph Scholz 248cc2d013 change publisher from text to varchar for mssql 2019-12-28 15:49:37 +01:00
Christoph Scholz 00ccb119ea allow storage of emojis in archive on mssql 2019-12-27 13:06:06 +01:00