Commit graph

136 commits

Author SHA1 Message Date
Anton Khorev
c848a88240 Backfill note subscriptions 2024-11-08 10:30:43 +03:00
Anton Khorev
001fed4fd7 Create note subscription table and model 2024-10-28 02:35:25 +03:00
Tom Hughes
28650d4dfb Drop creation_ip column 2024-09-16 17:41:22 +01:00
Tom Hughes
9ab0aee030 Backfill the creation_address column from creation_ip 2024-09-13 11:04:34 +01:00
Tom Hughes
336ad6db03 Add creation_address column to users
This is a properly typed and indexed column that is intended
to replace creation_ip to allow fast queries.
2024-09-10 19:16:03 +01:00
Tom Hughes
17bc0853a0 Drop support for OAuth 1 2024-09-01 03:43:02 +03:00
Anton Khorev
3bba84ed3a Backfill block deactivates_at 2024-08-23 18:25:14 +01:00
Anton Khorev
cff4c63713 Add deactivates_at date to user blocks
Block deactivation dates that take needs_view-block views into account were derived using updated_at. This was possible because inactive blocks couldn't be edited and their updated_at date wouldn't change. With editing of inactive blocks enabled deactivation date needs to be saved explicitly.
2024-08-19 14:33:20 +03:00
Tom Hughes
f61ac2586f Add support for per-user limits on the size of changes that can be made 2024-06-19 00:46:34 +01:00
Nenad Vujicic
a4d3d324ec Add note and diary comments counts to the user profile
Fixes #1643
2024-06-07 21:20:42 +02:00
Anton Khorev
b8cf4b59e5 Add (creator_id, id) index to blocks table 2024-04-05 12:21:08 +03:00
Ishmeet Singh
a33174acb8 Add NOT NULL constraints to redaction title and description 2024-03-11 09:27:11 +00:00
Tom Hughes
29cc21c599 Drop user tokens table 2024-02-28 21:02:54 +00:00
Tom Hughes
9db635a992 Drop lowercase index on display names 2024-01-17 19:05:25 +00:00
Andy Allan
d5efa4c357
Merge pull request #4405 from tomhughes/normalize-display-name
Require user names to be unique after unicode normalisation
2024-01-17 16:24:09 +00:00
Gregory Igelmund
efc61f1315 Add basic structures for UserMute and Message muting logic
Including models, migration, controllers, views & locales.
2023-12-19 12:57:47 -05:00
Tom Hughes
c12f8959dd Require user names to be unique after unicode normalisation
As with the previous checks on case sensitivity this only affects
new users, and changes to names of existing users.
2023-12-13 22:27:36 +00:00
Tom Hughes
d303b4f6e9 Merge remote-tracking branch 'upstream/pull/4391' 2023-12-06 17:54:47 +00:00
Andy Allan
367fa44a74 Migrate some sequences to use bigints
These primary keys were converted to bigints in migrations, but the
sequences were left unmentioned. If the original migrations are run on
postgresql 10.0+, then this leads to a mismatch in column types vs sequence
types. This migration fixes these mismatches.

If the original migrations were run on postgresql < 10, all sequences were
bigints anyway, and this migration is a no-op.

If the sequence is a bigint, then postgresql doesn't output that fact in the
statement dump.

Refs #4298
2023-12-06 14:54:12 +00:00
Andy Allan
4c77f9d780 Add comment for btree_gist to structure.sql
Refs #4298
2023-12-06 13:36:52 +00:00
Anton Khorev
a8aaf62e62 Add earliest allowed deletion time to user model 2023-11-22 17:02:48 +03:00
Tom Hughes
2f11b77309 Add support for per-user limits on the rate changes can be made 2023-11-02 08:59:57 +00:00
Tom Hughes
c6bb4a5f4e Add importer role that can be associated with higher rate limits 2023-11-02 08:58:12 +00:00
Tom Hughes
4f542ef900 Remove extraneous fields from primary keys for relation members 2023-10-26 18:08:26 +01:00
Tom Hughes
32627a1377 Update database structure for change in migration ordering 2023-10-18 18:26:14 +01:00
Tom Hughes
387ecce798 Add a primary key to the changeset_tags table 2023-10-08 12:33:54 +01:00
Milan Cvetkovic
8a22bfb222 Add unconfigured doorkeeper-openid_connect
After executing:
rails generate doorkeeper:openid_connect:install
rails generate doorkeeper:openid_connect:install

Split migration script to 2 to avoid deadlock.
2023-10-03 18:53:09 +01:00
Tom Hughes
a274726f46 Add rate limiting for changeset comments
Fixes #4196
2023-08-25 19:53:04 +01:00
Milan Cvetkovic
ef6803416b Add migration script 2023-08-20 10:17:42 +01:00
Andy Allan
479c1575e1 Remove tile_for_point SQL functions
This removes both the pl/pgsql version and the shared library version
of the `tile_for_point` SQL function. This function was only used in some
old migrations, and is not required for production usage.

Removing this function simplifies the installation and configuration for
new developers.

These SQL functions are separate from the `tile_for_point` ruby/C function
which is part of the quad_tile gem. This function is still used when
creating and updating database records.

Fixes #3110.
2022-12-07 17:22:50 +00:00
Andy Allan
cc99d8169f Remove default values from id columns
In both the case of primary keys, and also foreign key references,
there's no need to set a default value.

This doesn't have a big impact in routine situations, but can be
very confusing when debugging corner cases.
2022-02-23 15:22:37 +00:00
Tom Hughes
7eafdca51c Update to rails 7.0.2.2 2022-02-16 14:26:57 +00:00
Tom Hughes
7d53525219 Index note comments by author and date
Fixes #3443
2022-02-01 18:48:18 +00:00
Tom Hughes
cf54b68f84 Restore accidentally deleted lines in database structure 2021-08-06 00:19:39 +01:00
Tom Hughes
81c3ebe03c Remove xid_to_int4 postgres function
Fixes #3288
2021-08-06 00:15:40 +01:00
Tom Hughes
e222329d04 Add support for OAuth2 using doorkeeper 2021-05-18 12:05:32 +01:00
Tom Hughes
a71b8af4d1 Update to rails 6.1.3.2 2021-05-12 18:49:21 +01:00
Tom Hughes
84c601460f Add rate limiting to user friendships 2021-05-11 12:10:36 +01:00
mmd-osm
4e6d729529 Remove /api/0.6/changes endpoint
Also removes sql functions which are only used by this endpoint
2021-02-03 14:06:34 +00:00
Tom Hughes
384ac46102 Convert id column for oauth_nonces to bigint 2020-12-14 14:48:59 +00:00
Tom Hughes
22e56a9f36 Revert accidental changes to database structure 2020-10-08 09:51:04 +01:00
Tom Hughes
06a98ad983 Index changeset comments by changeset and date 2020-10-06 23:10:52 +01:00
Tom Hughes
1946c84f71 Index changeset comments by author and date 2020-10-06 22:42:44 +01:00
mmd-osm
f47aaa58c3 travis: update structure.sql 2019-12-30 12:55:59 +01:00
Tom Hughes
22cd2314e5 Update to rails 6.0.1 2019-11-24 11:05:02 +00:00
Andy Allan
56d9b8a4ce Remove the users.nearby column
Refs #2417 and #2432
2019-11-20 15:07:42 +01:00
Matt Amos
689821c224 Ooops, forgot to commit changes to db/structure.sql 2019-10-21 15:05:16 +01:00
Tom Hughes
3e17c3aab6 Drop postgres 9.6 specific setting from structure.sql
Closes #2404
2019-10-20 19:22:47 +01:00
Matt Amos
809b194030 Reverting part of the db/structure.sql change which had been unintentionally committed. (perhaps PG version difference?) 2019-10-04 15:38:42 +01:00
Matt Amos
098e73479b Remove shared lib PG functions from committed DB structure. 2019-10-04 13:40:27 +01:00