Commit graph

454 commits

Author SHA1 Message Date
Benjamin Neff
e08440d7ba
Merge migrations from before 0.6.0.0 to 0000_create_schema.rb
closes #7580
2017-08-26 03:13:05 +02:00
Benjamin Neff
b040f85790
Remove root_guid from reshares when post is deleted
And cleanup old reshares with deleted root posts

closes #7578
2017-08-26 03:08:37 +02:00
cmrd Senya
45619cb153
Account migration model and message support
This commit introduces support for AccountMigration federation message
receive. It covers the cases when the new home pod for a user is remote
respective to the recepient pod of the message. It also allows to initiate
migration locally by a podmin from the rails console. This will give the
pods a possibility to understand the account migration event on the
federation level and thus future version which will implement migration
will be backward compatible with the pods starting from this commit.
2017-08-15 01:32:34 +03:00
Benjamin Neff
1db6381308
Reset stuck exports 2017-08-14 00:36:52 +02:00
Benjamin Neff
dbde75abcf
Add missing unique indexes from #7234 2017-08-13 20:10:07 +02:00
Benjamin Neff
1d5460cd64
Cleanup invalid aspects and set unique index 2017-08-13 20:10:07 +02:00
Benjamin Neff
0577bf8058
Add missing indexes
See #7234
2017-08-13 20:10:07 +02:00
Benjamin Neff
245ad9e04d
Remove diaspora_handle from AccountDeletions and add unique index 2017-08-13 19:43:04 +02:00
Benjamin Neff
6b8c2ebe9f
Fix rubocop cop namespace for ExtraSpacing 2017-08-12 15:39:27 +02:00
Benjamin Neff
ec680962ee
Convert CreateSchema migration to real migration with up method
Otherwise Rails 5 would ignore the migration version and create the
tables with bitints as IDs on MySQL.
2017-08-12 15:39:27 +02:00
Dennis Schubert
50f1fd304f
Remove UTF8 to UTF8mb4 migration
we released that in 0.5.0.0 in 2015, we do not support skipping majors
anyway, and this is broken in Rails 5, so let's remove this. If people
upgrade from before 0.5.0.0, they have to upgrade via 0.6.0.0, but
that's written in the documenation.
2017-08-12 15:39:27 +02:00
Dennis Schubert
ef70549832
Replace usages of the deprecated delete_all with conditions 2017-08-12 15:39:26 +02:00
Dennis Schubert
b614237504
Make all current migrations Rails 4.2 based 2017-08-12 15:39:26 +02:00
Dennis Schubert
1f272f5306
Do not touch the schema_migrations table in migrations
... this breaks the Rails 5 upgrade, and it's actually no longer needed.
New installations will have the right size anyway, and even if some
older installations miss the migration by not updating for 2 years, it
still doesn't matter since there is no risk that we will ever have
emojis in our migration filenames.
2017-08-12 15:39:26 +02:00
Benjamin Neff
eb19c327e2
Add ApplicationRecord 2017-08-12 15:39:20 +02:00
Benjamin Neff
95def40c55
Make Message entity non-relayable
Related to #36
2017-07-02 23:56:00 +02:00
Steffen van Bergerem
154ea6515a
Fix mentions in comments migration on PostgreSQL 2016-11-29 23:36:42 +01:00
cmrd Senya
33ad411bbd
Mentions in comments backend changes 2016-11-28 15:56:56 +02:00
Benjamin Neff
57c0330535
Schedule a connection-check when receiving a message from an offline pod
closes #7158
2016-11-06 02:40:05 +01:00
Benjamin Neff
4480f59e6e
Remove empty pod and make pod host NOT NULL 2016-10-27 02:25:40 +02:00
hilkoc
b7791e6c9d Add user setting for default post visibility
fixes #4319

closes #7118
2016-10-26 02:48:11 +02:00
Benjamin Neff
b4455aaf25
Fix 20160906225138_fix_photos_share_visibilities.rb for postgres
Turns out that postgres can't handle "0" as boolean, but mysql can
handle "false".

closes #7115#pullrequestreview-699342
2016-09-20 10:21:49 +02:00
Benjamin Neff
3f2586bc6f
Create share visibilities for photos attached to a private post
Also fixed the "fix public photos"-migration, because it didn't work
with migration-models :/

fixes #6177
2016-09-20 04:24:37 +02:00
Benjamin Neff
50e7314535
Cleanup invalid unconfirmed emails
Also remove confirm_email_token when unconfirmed_email is removed.

Fixes #7048

closes #7051
2016-09-04 21:40:27 +02:00
Steffen van Bergerem
4d51c02432 Add OpenGraph video support
closes #7043
2016-09-04 03:55:09 +02:00
Lukas Matt
cf5a9d7e04 Delete all null entries before removing the column
related to #7032

Signed-off-by: Lukas Matt <lukas@zauberstuhl.de>

closes #7038
2016-09-01 22:49:07 +02:00
Benjamin Neff
6d8b7b49cb
Remove started sharing notifications where the contact doesn't exist
The same as #7009 but now all of them ;)
2016-08-23 01:52:35 +02:00
Benjamin Neff
0e4c899307 Remove started sharing notifications where the contact doesn't exist
Before #6873 we deleted contacts when someone blocks a person, but we
didn't drop the notification for the started sharing event. In #6864
we try to get the contact for the notification, which is not there
anymore.

So we need to remove the notifications for the contacts that don't exit
anymore.
2016-08-20 20:50:46 +02:00
Jonne Haß
3dd2f2159c Merge pull request #6975 from cmrd-senya/6857-misscoped-destroy
[API] don't store ID tokens in DB
2016-08-13 20:11:54 +02:00
cmrd Senya
9546fddb9e
[API] don't store ID tokens in DB
fix #6857
2016-08-13 20:09:43 +03:00
Benjamin Neff
6248e945c2 fix migration for invitation-cleanup
delete invitations-table (and constraints) before deleting the users
2016-08-13 18:41:57 +02:00
Benjamin Neff
3b1a5c6bdf don't reduce number of invites when registration is open
otherwise the counter goes into negative ;)

also  reset all negative counters
2016-08-13 13:51:02 +02:00
Benjamin Neff
6cf1cd5d76 migration to remove old unused invitation columns from users table 2016-08-13 01:47:27 +02:00
Jonne Haß
380b180705
guard against some data inconsistency case in the signature tables migration 2016-08-09 10:44:29 +02:00
Benjamin Neff
88c7c1568d Rewrite migration for participation counter
This migrations runs only if the old 20150404193023_participation_counter
migration has not been run.

The new migration is a lot faster, because it runs after the
participation-cleanup migration has been run, so the participation table
is now a lot smaller for people upgrading from 0.5.x to 0.6.x.

It also doesn't remove manually created participations (without likes,
comments or poll participations on the same post).

Fixes #6786
2016-08-08 20:56:47 +02:00
Benjamin Neff
d3edbfd829 remove pending flag from posts 2016-08-08 19:37:10 +02:00
Benjamin Neff
012f5b5614 migration to remove all unused old columns from the posts table 2016-08-08 19:37:07 +02:00
Benjamin Neff
b82d1c2ca9 add migration for signature tables 2016-08-08 18:56:37 +02:00
Benjamin Neff
b3a9bf3925 add migration to cleanup participations
* remove author_signature column
* delete all self-participating participations
* delete all participations where author and post-author are remote
* delete all duplicate participations
* delete all participations without post
* create unique index
2016-06-26 06:21:02 +02:00
Benjamin Neff
9b0e40bf91 delete duplicates and create unique indexes:
* conversations
* messages
* photos
* polls
* poll answers
* poll participations

fixes #4697
2016-06-26 06:20:59 +02:00
cmrd Senya
fd975eeae5
Cleanup migration that removes duplicating AspectVisibilities 2016-06-01 02:34:19 +03:00
Lukas Matt
16275ec926 account_deletions get stuck while selecting participations
Following query takes over 20 minutes and fills up the database:
SELECT * FROM participations WHERE author_id = XXXXX

On servers with a huge participations-table this is a serious
performance issue which is easily fixed by the author_id index

Signed-off-by: Lukas Matt <lukas@zauberstuhl.de>
2016-03-27 14:16:03 +02:00
cmrd Senya
2986aa8b24 Remove diaspora_handle from shareables
We can determine diaspora_handle from a relation with people for the
shareables (posts, photos). So we don't need to store diaspora_handle in
the DB. Also remove tmp_old_id from photos which is not refenrenced anywhere.
2016-03-07 18:47:21 +03:00
Benjamin Neff
10af3a8b11 fix pod table migration if someone deleted a user (owner) manually 2016-03-06 23:55:28 +01:00
Jonne Haß
39ae5e741e Merge pull request #6732 from SuperTux88/cleanup-aspect_visibilities
Cleanup aspect visibilities
2016-03-05 11:05:55 +01:00
Benjamin Neff
b1a6516474 add migration for pods-table
* add port to pods
* remove url from person and link people with pod-table
2016-03-05 00:12:54 +01:00
Benjamin Neff
54ff7ee278 migration to cleanup aspect_visibilities
* remove all for public posts
* remove all for deleted posts
2016-03-04 20:13:52 +01:00
Benjamin Neff
c778fc4232 use plain sql for update_all to fix postgres
also added a migration model
2016-03-04 15:14:45 +01:00
Benjamin Neff
7011f2961d Revert "Back out #6723 due to Postgres breakage"
This reverts commit 84cfbd22fc.
2016-03-04 14:01:31 +01:00
Dennis Schubert
84cfbd22fc Back out #6723 due to Postgres breakage
This reverts commit 832a56134b, reversing
changes made to 75c3e6068c.
2016-03-04 13:33:32 +01:00