-
-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3228 from hughrun/user-export
Fix user exports to deal with s3 storage
- Loading branch information
Showing
25 changed files
with
730 additions
and
303 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# Generated by Django 3.2.23 on 2024-01-28 02:49 | ||
|
||
import bookwyrm.storage_backends | ||
import django.core.serializers.json | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("bookwyrm", "0192_sitesettings_user_exports_enabled"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="bookwyrmexportjob", | ||
name="export_json", | ||
field=models.JSONField( | ||
encoder=django.core.serializers.json.DjangoJSONEncoder, null=True | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="bookwyrmexportjob", | ||
name="json_completed", | ||
field=models.BooleanField(default=False), | ||
), | ||
migrations.AlterField( | ||
model_name="bookwyrmexportjob", | ||
name="export_data", | ||
field=models.FileField( | ||
null=True, | ||
storage=bookwyrm.storage_backends.ExportsFileStorage, | ||
upload_to="", | ||
), | ||
), | ||
migrations.CreateModel( | ||
name="AddFileToTar", | ||
fields=[ | ||
( | ||
"childjob_ptr", | ||
models.OneToOneField( | ||
auto_created=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
parent_link=True, | ||
primary_key=True, | ||
serialize=False, | ||
to="bookwyrm.childjob", | ||
), | ||
), | ||
( | ||
"parent_export_job", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="child_edition_export_jobs", | ||
to="bookwyrm.bookwyrmexportjob", | ||
), | ||
), | ||
], | ||
options={ | ||
"abstract": False, | ||
}, | ||
bases=("bookwyrm.childjob",), | ||
), | ||
migrations.CreateModel( | ||
name="AddBookToUserExportJob", | ||
fields=[ | ||
( | ||
"childjob_ptr", | ||
models.OneToOneField( | ||
auto_created=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
parent_link=True, | ||
primary_key=True, | ||
serialize=False, | ||
to="bookwyrm.childjob", | ||
), | ||
), | ||
( | ||
"edition", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="bookwyrm.edition", | ||
), | ||
), | ||
], | ||
options={ | ||
"abstract": False, | ||
}, | ||
bases=("bookwyrm.childjob",), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Generated by Django 3.2.23 on 2024-03-18 17:37 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("bookwyrm", "0193_auto_20240128_0249"), | ||
("bookwyrm", "0195_alter_user_preferred_language"), | ||
] | ||
|
||
operations = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Generated by Django 3.2.25 on 2024-03-24 02:35 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("bookwyrm", "0196_merge_20240318_1737"), | ||
("bookwyrm", "0196_merge_pr3134_into_main"), | ||
] | ||
|
||
operations = [] |
23 changes: 23 additions & 0 deletions
23
bookwyrm/migrations/0198_alter_bookwyrmexportjob_export_data.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 3.2.25 on 2024-03-26 11:37 | ||
|
||
import bookwyrm.models.bookwyrm_export_job | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("bookwyrm", "0197_merge_20240324_0235"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="bookwyrmexportjob", | ||
name="export_data", | ||
field=models.FileField( | ||
null=True, | ||
storage=bookwyrm.models.bookwyrm_export_job.select_exports_storage, | ||
upload_to="", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Generated by Django 3.2.25 on 2024-03-26 12:17 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("bookwyrm", "0198_alter_bookwyrmexportjob_export_data"), | ||
("bookwyrm", "0198_book_search_vector_author_aliases"), | ||
] | ||
|
||
operations = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 3.2.25 on 2024-03-27 19:14 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("bookwyrm", "0199_merge_20240326_1217"), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name="addfiletotar", | ||
name="childjob_ptr", | ||
), | ||
migrations.RemoveField( | ||
model_name="addfiletotar", | ||
name="parent_export_job", | ||
), | ||
migrations.DeleteModel( | ||
name="AddBookToUserExportJob", | ||
), | ||
migrations.DeleteModel( | ||
name="AddFileToTar", | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Generated by Django 3.2.25 on 2024-04-13 02:32 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("bookwyrm", "0200_auto_20240327_1914"), | ||
("bookwyrm", "0204_merge_20240409_1042"), | ||
] | ||
|
||
operations = [] |
Oops, something went wrong.