Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Django Upgrade] [Reference PR] The rest of the fixes #10048

Closed
Show file tree
Hide file tree
Changes from 71 commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
7c3b9ad
remove post-migrate signals from migration stream (#9964)
Johnetordoff Jun 24, 2022
4a8bd61
move createcachetable to post migrate signal (#9944)
Johnetordoff Jun 27, 2022
bf7eb21
[ENG-3836] Investigate waffle flags (#9950)
Johnetordoff Jul 1, 2022
15f15e9
[ENG-3865] Create Licenses using post-migrate signal (#9961)
Johnetordoff Jul 12, 2022
5746a84
[ENG-3863] Move schema ensuring and schema blocks update to post-migr…
cslzchen Jul 13, 2022
c2c5e4e
[ENG-3868] Move blocked email domains to post-migrate signal (#9958)
Johnetordoff Jul 13, 2022
f22e531
[ENG-3866] Move citation style population out of migration stream (#9…
Johnetordoff Jul 15, 2022
250b832
[ENG-3867] Create Storage Regions on post migration signal (#9965)
Johnetordoff Jul 19, 2022
8052ea4
[ENG-3836] Follow-up: Add PyYAML to Requirements (#9993)
cslzchen Jul 27, 2022
65b344b
[ENG-3862] Move post-migrate signal out of migration stream for defau…
Johnetordoff Jul 28, 2022
205e560
Remove unused password change view/route (#9985)
Johnetordoff Aug 11, 2022
1675f6f
Update import paths and fix deprecated modules for Django 3 (#9983)
Johnetordoff Aug 11, 2022
391af60
Update postgres backend and remove failover router for Django 3 (#10011)
Johnetordoff Aug 11, 2022
c9c7f44
Move file metadata population to unit test fixtures (#9994)
Johnetordoff Aug 11, 2022
721ef90
Remove password_reset from installed apps
cslzchen Aug 11, 2022
75ffbb0
Merge remote-tracking branch 'upstream/develop' into feature/django_u…
cslzchen Aug 16, 2022
285d9a6
[Django Upgrade] Fix one sub-query slicing issue (#10012)
Johnetordoff Aug 17, 2022
06f6fe9
[Django Upgrade] Upgrade django-elasticsearch-metrics (#10021)
Johnetordoff Aug 17, 2022
724f59a
[Django Upgrade] Replace M2M direct assignment (#10010)
Johnetordoff Aug 17, 2022
afa62a7
[Django Upgrade] Upgrade markdown and mdx_del_ins (#9984)
Johnetordoff Aug 17, 2022
d15c88f
[Django Upgrade] Move schema activeness/visibility update to pytest f…
cslzchen Aug 18, 2022
3f162f1
Remove osf migrations
cslzchen Aug 17, 2022
f971149
Remove addon migrations
cslzchen Aug 17, 2022
f41eb8a
Init migrations - osf
cslzchen Aug 17, 2022
dab1bbc
Init migrations - addons
cslzchen Aug 17, 2022
994fcfd
Fix migration for NotableEmailDomain
cslzchen Aug 17, 2022
a54bbbe
Fix circular import with built-in admin migrations
cslzchen Aug 17, 2022
699fc1c
Add a RunSQL migration to update indexes
cslzchen Aug 22, 2022
0dc9220
Merge pull request #10028 from cslzchen/feature/clean_squash
mfraezz Aug 23, 2022
cfb012e
Merge remote-tracking branch 'upstream/develop' into feature/django_u…
cslzchen Sep 1, 2022
cb25d71
Upgrade django to 3.2.15 (and related dependencies)
cslzchen Aug 31, 2022
720b6ec
Make fields defined on typedmodels subclasses nullable
cslzchen Aug 31, 2022
6b7ce7f
Add required on_delete=CASCADE (default) to FKs missing it
cslzchen Aug 31, 2022
0192907
Fix django CORS whitelist settings due to orgin definition update
cslzchen Sep 1, 2022
51f4f48
Add/Enable missing templates and middlewares in api settings
cslzchen Sep 1, 2022
41d4b50
Comment out admin permissions that clash with built-in "view" ones
cslzchen Sep 1, 2022
65f39c8
Add migrations for django upgrade base fixes
cslzchen Sep 1, 2022
0ad3f7c
Fix system check warnings for django admin
cslzchen Sep 1, 2022
a2dc7ba
Merge branch 'longze/django3-upgrade-base' into feature/django_upgrade
cslzchen Sep 1, 2022
2a0aa6e
Fix django cache table creation
cslzchen Sep 2, 2022
66edda0
Enable django.contrib.sessions.middleware.SessionMiddleware
cslzchen Sep 7, 2022
37bd4e4
Use default truthy and falsy values from upgraded DRF 3.13.1
cslzchen Sep 7, 2022
bcd2c6e
Use JsonField from django.db.models and django.forms
cslzchen Sep 7, 2022
88c057e
Merge branch 'longze/django3-json-field-update' into feature/django_u…
cslzchen Sep 7, 2022
0ce6496
Fix session cookie encoding/decoding by using ensure_str()
cslzchen Sep 7, 2022
fc0d032
Merge branch 'fix-django-session-issues' into feature/django_upgrade
cslzchen Sep 8, 2022
2fbc057
Use prefetch instead of Django include
Aug 29, 2022
eb93348
Merge branch 'replace-django-include-with-prefetch' into feature/djan…
cslzchen Sep 9, 2022
07ee7e6
Fix CORS for ORIGINS_WHITELIST
cslzchen Sep 9, 2022
9e9c487
Merge branch 'django-3-update-cors' into feature/django_upgrade
cslzchen Sep 9, 2022
4e19413
Rename auto generated migration for django3 upgrade fixes
cslzchen Sep 12, 2022
d10824f
Remove QuickFile check from get_serializer_class for FileDetail view
cslzchen Sep 12, 2022
4e56c87
Merge remote-tracking branch 'upstream/develop' into feature/django_u…
cslzchen Sep 12, 2022
68acb17
clear cached property for storage region.
Sep 13, 2022
57e81a6
turn off notify emails for tests in Django 3 upgrade
Sep 13, 2022
0bc3d5c
upgrade Django factory models for Django 3
Sep 13, 2022
7d3c644
remove update_version_metadata with tests
Sep 13, 2022
51a6b1b
remove django-include and other unused egap backfill tests
Sep 13, 2022
e21b460
Make DFR serializer fixes
Sep 13, 2022
1a70f61
make registration metadata use real schema
Sep 13, 2022
f30f1ce
Fix changed test due to DRF upgrade issues
Sep 13, 2022
fca9e81
fix duplication of 'view_node' for admin app
Sep 13, 2022
dffad34
fix test issues by reloading refferents
Sep 13, 2022
db10898
add DEFAULT_AUTO_FIELD to end warnings for Django 3 upgrade
Sep 13, 2022
0c1cc03
fix DRF issue
Sep 13, 2022
494e396
Fix an issue where get_node() is not avaialbe from context view
cslzchen Sep 12, 2022
6548110
Add registration_schema to DraftRegistrationDetailSerializer
cslzchen Sep 12, 2022
0bb5fc5
Add id to DraftRegistrationDetailSerializer
cslzchen Sep 13, 2022
d69128c
Merge branch 'fix-draft-registration-serializers' into feature/django…
cslzchen Sep 13, 2022
7f6219b
Merge branch 'feature/django_upgrade' of https://github.com/CenterFor…
Sep 13, 2022
3f97cd6
sort out query issue for `visible_contributor_to` for Django 3 upgrade
Sep 13, 2022
ec4da2f
update schema code
Sep 14, 2022
6f64b38
skip test_validate_social_profile_website_many_different due to it br…
Sep 14, 2022
6dcb706
fix more draft registrations mro problems
Sep 14, 2022
b1845e4
refactor url to re_path for django 3 update to avoid annoying depreci…
Sep 14, 2022
95c9c83
Fix middleware order and replace deprecated staticfiles with static
Sep 14, 2022
ba02936
remove nullboolean fields to prevent depreciation warning
Sep 14, 2022
fd42db4
fix admin app depreciating staticfiles for Django 3 upgrade
Sep 14, 2022
dd377cc
Fix and rework from_db_value & to_python for EncryptedJSONField
cslzchen Sep 14, 2022
5f7fd3b
Merge branch 'feature/django_upgrade' of https://github.com/CenterFor…
Sep 15, 2022
b57c74e
fix admin login failure for django upgrade
Sep 15, 2022
93081d4
Fix admin login failure for django upgrade
Sep 15, 2022
b58c17f
upgrade to end dependabot warnings
Johnetordoff Sep 19, 2022
5a24b8f
Merge branch 'feature/django_upgrade' of https://github.com/CenterFor…
Sep 19, 2022
3f6a665
more dependabot updates
Sep 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
29 changes: 14 additions & 15 deletions addons/bitbucket/migrations/0001_initial.py
@@ -1,56 +1,55 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-07-07 15:19
# Generated by Django 1.11.29 on 2022-08-17 19:15
from __future__ import unicode_literals

from django.conf import settings
import addons.base.models
from django.db import migrations, models
import django.db.models.deletion
import django_extensions.db.fields
import osf.models.base
import osf.utils.datetime_aware_jsonfield
import osf.utils.fields


class Migration(migrations.Migration):

initial = True

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('osf', '0042_auto_20170707_1019'),
]

operations = [
migrations.CreateModel(
name='NodeSettings',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')),
('_id', models.CharField(db_index=True, default=osf.models.base.generate_object_id, max_length=24, unique=True)),
('deleted', models.BooleanField(default=False)),
('is_deleted', models.BooleanField(default=False)),
('deleted', osf.utils.fields.NonNaiveDateTimeField(blank=True, null=True)),
('user', models.TextField(blank=True, null=True)),
('repo', models.TextField(blank=True, null=True)),
('hook_id', models.TextField(blank=True, null=True)),
('external_account', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='addons_bitbucket_node_settings', to='osf.ExternalAccount')),
('owner', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='addons_bitbucket_node_settings', to='osf.AbstractNode')),
],
options={
'abstract': False,
},
bases=(models.Model, osf.models.base.QuerySetExplainMixin, addons.base.models.BaseStorageAddon),
),
migrations.CreateModel(
name='UserSettings',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')),
('_id', models.CharField(db_index=True, default=osf.models.base.generate_object_id, max_length=24, unique=True)),
('deleted', models.BooleanField(default=False)),
('is_deleted', models.BooleanField(default=False)),
('deleted', osf.utils.fields.NonNaiveDateTimeField(blank=True, null=True)),
('oauth_grants', osf.utils.datetime_aware_jsonfield.DateTimeAwareJSONField(blank=True, default=dict, encoder=osf.utils.datetime_aware_jsonfield.DateTimeAwareJSONEncoder)),
('owner', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='addons_bitbucket_user_settings', to=settings.AUTH_USER_MODEL)),
],
options={
'abstract': False,
},
),
migrations.AddField(
model_name='nodesettings',
name='user_settings',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='addons_bitbucket.UserSettings'),
bases=(models.Model, osf.models.base.QuerySetExplainMixin),
),
]
40 changes: 0 additions & 40 deletions addons/bitbucket/migrations/0002_auto_20170808_1140.py

This file was deleted.

41 changes: 41 additions & 0 deletions addons/bitbucket/migrations/0002_auto_20220817_1915.py
@@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2022-08-17 19:15
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

initial = True

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('addons_bitbucket', '0001_initial'),
('osf', '0001_initial'),
]

operations = [
migrations.AddField(
model_name='usersettings',
name='owner',
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='addons_bitbucket_user_settings', to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='nodesettings',
name='external_account',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='addons_bitbucket_node_settings', to='osf.ExternalAccount'),
),
migrations.AddField(
model_name='nodesettings',
name='owner',
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='addons_bitbucket_node_settings', to='osf.AbstractNode'),
),
migrations.AddField(
model_name='nodesettings',
name='user_settings',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='addons_bitbucket.UserSettings'),
),
]
36 changes: 0 additions & 36 deletions addons/bitbucket/migrations/0003_rename_deleted_field.py

This file was deleted.

19 changes: 15 additions & 4 deletions addons/box/migrations/0001_initial.py
@@ -1,10 +1,13 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-03-23 20:34
# Generated by Django 1.11.29 on 2022-08-17 19:15
from __future__ import unicode_literals

import addons.base.models
from django.db import migrations, models
import django_extensions.db.fields
import osf.models.base
import osf.utils.datetime_aware_jsonfield
import osf.utils.fields


class Migration(migrations.Migration):
Expand All @@ -19,26 +22,34 @@ class Migration(migrations.Migration):
name='NodeSettings',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')),
('_id', models.CharField(db_index=True, default=osf.models.base.generate_object_id, max_length=24, unique=True)),
('deleted', models.BooleanField(default=False)),
('is_deleted', models.BooleanField(default=False)),
('deleted', osf.utils.fields.NonNaiveDateTimeField(blank=True, null=True)),
('folder_id', models.TextField(blank=True, null=True)),
('folder_name', models.TextField(blank=True, null=True)),
('folder_path', models.TextField(blank=True, null=True)),
],
options={
'abstract': False,
},
bases=(models.Model, osf.models.base.QuerySetExplainMixin, addons.base.models.BaseStorageAddon),
),
migrations.CreateModel(
name='UserSettings',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')),
('_id', models.CharField(db_index=True, default=osf.models.base.generate_object_id, max_length=24, unique=True)),
('deleted', models.BooleanField(default=False)),
('oauth_grants', osf.utils.datetime_aware_jsonfield.DateTimeAwareJSONField(blank=True, default=dict)),
('is_deleted', models.BooleanField(default=False)),
('deleted', osf.utils.fields.NonNaiveDateTimeField(blank=True, null=True)),
('oauth_grants', osf.utils.datetime_aware_jsonfield.DateTimeAwareJSONField(blank=True, default=dict, encoder=osf.utils.datetime_aware_jsonfield.DateTimeAwareJSONEncoder)),
],
options={
'abstract': False,
},
bases=(models.Model, osf.models.base.QuerySetExplainMixin),
),
]
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-03-23 20:34
# Generated by Django 1.11.29 on 2022-08-17 19:15
from __future__ import unicode_literals

from django.conf import settings
Expand All @@ -12,9 +12,9 @@ class Migration(migrations.Migration):
initial = True

dependencies = [
('addons_box', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('osf', '0001_initial'),
('addons_box', '0001_initial'),
]

operations = [
Expand Down
40 changes: 0 additions & 40 deletions addons/box/migrations/0003_auto_20170713_1125.py

This file was deleted.

36 changes: 0 additions & 36 deletions addons/box/migrations/0004_rename_deleted_field.py

This file was deleted.

19 changes: 15 additions & 4 deletions addons/dataverse/migrations/0001_initial.py
@@ -1,10 +1,13 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-03-23 20:34
# Generated by Django 1.11.29 on 2022-08-17 19:15
from __future__ import unicode_literals

import addons.base.models
from django.db import migrations, models
import django_extensions.db.fields
import osf.models.base
import osf.utils.datetime_aware_jsonfield
import osf.utils.fields


class Migration(migrations.Migration):
Expand All @@ -19,8 +22,11 @@ class Migration(migrations.Migration):
name='NodeSettings',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')),
('_id', models.CharField(db_index=True, default=osf.models.base.generate_object_id, max_length=24, unique=True)),
('deleted', models.BooleanField(default=False)),
('is_deleted', models.BooleanField(default=False)),
('deleted', osf.utils.fields.NonNaiveDateTimeField(blank=True, null=True)),
('dataverse_alias', models.TextField(blank=True, null=True)),
('dataverse', models.TextField(blank=True, null=True)),
('dataset_doi', models.TextField(blank=True, null=True)),
Expand All @@ -30,17 +36,22 @@ class Migration(migrations.Migration):
options={
'abstract': False,
},
bases=(models.Model, osf.models.base.QuerySetExplainMixin, addons.base.models.BaseStorageAddon),
),
migrations.CreateModel(
name='UserSettings',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')),
('_id', models.CharField(db_index=True, default=osf.models.base.generate_object_id, max_length=24, unique=True)),
('deleted', models.BooleanField(default=False)),
('oauth_grants', osf.utils.datetime_aware_jsonfield.DateTimeAwareJSONField(blank=True, default=dict)),
('is_deleted', models.BooleanField(default=False)),
('deleted', osf.utils.fields.NonNaiveDateTimeField(blank=True, null=True)),
('oauth_grants', osf.utils.datetime_aware_jsonfield.DateTimeAwareJSONField(blank=True, default=dict, encoder=osf.utils.datetime_aware_jsonfield.DateTimeAwareJSONEncoder)),
],
options={
'abstract': False,
},
bases=(models.Model, osf.models.base.QuerySetExplainMixin),
),
]
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-03-23 20:34
# Generated by Django 1.11.29 on 2022-08-17 19:15
from __future__ import unicode_literals

from django.conf import settings
Expand Down