morango 0.8.0__py2.py3-none-any.whl → 0.8.2__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of morango might be problematic. Click here for more details.
- morango/__init__.py +1 -2
- morango/apps.py +1 -0
- morango/constants/transfer_stages.py +1 -1
- morango/constants/transfer_statuses.py +1 -1
- morango/migrations/0001_squashed_0024_auto_20240129_1757.py +583 -0
- morango/migrations/0002_store_idx_morango_deserialize.py +21 -0
- morango/models/core.py +1 -0
- {morango-0.8.0.dist-info → morango-0.8.2.dist-info}/METADATA +9 -7
- {morango-0.8.0.dist-info → morango-0.8.2.dist-info}/RECORD +13 -11
- {morango-0.8.0.dist-info → morango-0.8.2.dist-info}/WHEEL +1 -1
- {morango-0.8.0.dist-info → morango-0.8.2.dist-info}/AUTHORS.md +0 -0
- {morango-0.8.0.dist-info → morango-0.8.2.dist-info}/LICENSE +0 -0
- {morango-0.8.0.dist-info → morango-0.8.2.dist-info}/top_level.txt +0 -0
morango/__init__.py
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
__version__ = "0.8.0"
|
|
1
|
+
__version__ = "0.8.2"
|
morango/apps.py
CHANGED
|
@@ -7,6 +7,7 @@ from morango.registry import syncable_models
|
|
|
7
7
|
class MorangoConfig(AppConfig):
|
|
8
8
|
name = "morango"
|
|
9
9
|
verbose_name = "Morango"
|
|
10
|
+
default_auto_field = "django.db.models.AutoField"
|
|
10
11
|
|
|
11
12
|
def ready(self):
|
|
12
13
|
from morango.models.signals import add_to_deleted_models # noqa: F401
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""
|
|
2
2
|
This module contains constants representing the possible stages of a transfer session.
|
|
3
3
|
"""
|
|
4
|
-
from django.utils.translation import
|
|
4
|
+
from django.utils.translation import gettext_lazy as _
|
|
5
5
|
|
|
6
6
|
INITIALIZING = "initializing"
|
|
7
7
|
SERIALIZING = "serializing"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""
|
|
2
2
|
This module contains constants representing the possible statuses of a transfer session stage.
|
|
3
3
|
"""
|
|
4
|
-
from django.utils.translation import
|
|
4
|
+
from django.utils.translation import gettext_lazy as _
|
|
5
5
|
|
|
6
6
|
PENDING = "pending"
|
|
7
7
|
STARTED = "started"
|
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
# Generated by Django 3.2.24 on 2024-06-25 21:45
|
|
2
|
+
import django.db.models.deletion
|
|
3
|
+
import django.db.models.manager
|
|
4
|
+
import django.utils.timezone
|
|
5
|
+
from django.db import migrations
|
|
6
|
+
from django.db import models
|
|
7
|
+
|
|
8
|
+
import morango.models.fields.crypto
|
|
9
|
+
import morango.models.fields.uuids
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
# morango.migrations.0020_postgres_fix_nullable
|
|
13
|
+
# is ignored in this squashed migration, as it is replaced by
|
|
14
|
+
# the original change made via an edit to the prior migration.
|
|
15
|
+
# morango.migrations.0021_store_partition_index_create
|
|
16
|
+
# is turned into a non-concurrent index creation operation, as
|
|
17
|
+
# this will only be run on a fresh database.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class Migration(migrations.Migration):
|
|
21
|
+
|
|
22
|
+
replaces = [
|
|
23
|
+
("morango", "0001_initial"),
|
|
24
|
+
("morango", "0002_auto_20170511_0400"),
|
|
25
|
+
("morango", "0003_auto_20170519_0543"),
|
|
26
|
+
("morango", "0004_auto_20170520_2112"),
|
|
27
|
+
("morango", "0005_auto_20170629_2139"),
|
|
28
|
+
("morango", "0006_instanceidmodel_system_id"),
|
|
29
|
+
("morango", "0007_auto_20171018_1615"),
|
|
30
|
+
("morango", "0008_auto_20171114_2217"),
|
|
31
|
+
("morango", "0009_auto_20171205_0252"),
|
|
32
|
+
("morango", "0010_auto_20171206_1615"),
|
|
33
|
+
("morango", "0011_sharedkey"),
|
|
34
|
+
("morango", "0012_auto_20180927_1658"),
|
|
35
|
+
("morango", "0013_auto_20190627_1513"),
|
|
36
|
+
("morango", "0014_syncsession_extra_fields"),
|
|
37
|
+
("morango", "0015_auto_20200508_2104"),
|
|
38
|
+
("morango", "0016_store_deserialization_error"),
|
|
39
|
+
("morango", "0017_store_last_transfer_session_id"),
|
|
40
|
+
("morango", "0018_auto_20210714_2216"),
|
|
41
|
+
("morango", "0019_auto_20220113_1807"),
|
|
42
|
+
("morango", "0020_postgres_fix_nullable"),
|
|
43
|
+
("morango", "0021_store_partition_index_create"),
|
|
44
|
+
("morango", "0022_rename_instance_fields"),
|
|
45
|
+
("morango", "0023_add_instance_id_fields"),
|
|
46
|
+
("morango", "0024_auto_20240129_1757"),
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
initial = True
|
|
50
|
+
|
|
51
|
+
dependencies = []
|
|
52
|
+
|
|
53
|
+
operations = [
|
|
54
|
+
migrations.CreateModel(
|
|
55
|
+
name="DatabaseIDModel",
|
|
56
|
+
fields=[
|
|
57
|
+
(
|
|
58
|
+
"id",
|
|
59
|
+
morango.models.fields.uuids.UUIDField(
|
|
60
|
+
editable=False, primary_key=True, serialize=False
|
|
61
|
+
),
|
|
62
|
+
),
|
|
63
|
+
("current", models.BooleanField(default=True)),
|
|
64
|
+
(
|
|
65
|
+
"date_generated",
|
|
66
|
+
models.DateTimeField(default=django.utils.timezone.now),
|
|
67
|
+
),
|
|
68
|
+
("initial_instance_id", models.CharField(blank=True, max_length=32)),
|
|
69
|
+
],
|
|
70
|
+
options={
|
|
71
|
+
"abstract": False,
|
|
72
|
+
},
|
|
73
|
+
),
|
|
74
|
+
migrations.CreateModel(
|
|
75
|
+
name="DatabaseMaxCounter",
|
|
76
|
+
fields=[
|
|
77
|
+
(
|
|
78
|
+
"id",
|
|
79
|
+
models.AutoField(
|
|
80
|
+
auto_created=True,
|
|
81
|
+
primary_key=True,
|
|
82
|
+
serialize=False,
|
|
83
|
+
verbose_name="ID",
|
|
84
|
+
),
|
|
85
|
+
),
|
|
86
|
+
("instance_id", morango.models.fields.uuids.UUIDField()),
|
|
87
|
+
("counter", models.IntegerField()),
|
|
88
|
+
("partition", models.CharField(default="", max_length=128)),
|
|
89
|
+
],
|
|
90
|
+
options={
|
|
91
|
+
"abstract": False,
|
|
92
|
+
"unique_together": {("instance_id", "partition")},
|
|
93
|
+
},
|
|
94
|
+
),
|
|
95
|
+
migrations.CreateModel(
|
|
96
|
+
name="DeletedModels",
|
|
97
|
+
fields=[
|
|
98
|
+
(
|
|
99
|
+
"id",
|
|
100
|
+
morango.models.fields.uuids.UUIDField(
|
|
101
|
+
primary_key=True, serialize=False
|
|
102
|
+
),
|
|
103
|
+
),
|
|
104
|
+
("profile", models.CharField(max_length=40)),
|
|
105
|
+
],
|
|
106
|
+
),
|
|
107
|
+
migrations.CreateModel(
|
|
108
|
+
name="Store",
|
|
109
|
+
fields=[
|
|
110
|
+
("serialized", models.TextField(blank=True)),
|
|
111
|
+
("deleted", models.BooleanField(default=False)),
|
|
112
|
+
("last_saved_instance", morango.models.fields.uuids.UUIDField()),
|
|
113
|
+
("last_saved_counter", models.IntegerField()),
|
|
114
|
+
("model_name", models.CharField(max_length=40)),
|
|
115
|
+
("profile", models.CharField(max_length=40)),
|
|
116
|
+
("partition", models.TextField()),
|
|
117
|
+
(
|
|
118
|
+
"id",
|
|
119
|
+
morango.models.fields.uuids.UUIDField(
|
|
120
|
+
primary_key=True, serialize=False
|
|
121
|
+
),
|
|
122
|
+
),
|
|
123
|
+
("conflicting_serialized_data", models.TextField(blank=True)),
|
|
124
|
+
("_self_ref_fk", models.CharField(blank=True, max_length=32)),
|
|
125
|
+
("dirty_bit", models.BooleanField(default=False)),
|
|
126
|
+
(
|
|
127
|
+
"source_id",
|
|
128
|
+
models.CharField(
|
|
129
|
+
max_length=96,
|
|
130
|
+
),
|
|
131
|
+
),
|
|
132
|
+
("hard_deleted", models.BooleanField(default=False)),
|
|
133
|
+
("deserialization_error", models.TextField(blank=True)),
|
|
134
|
+
(
|
|
135
|
+
"last_transfer_session_id",
|
|
136
|
+
morango.models.fields.uuids.UUIDField(
|
|
137
|
+
blank=True, db_index=True, default=None, null=True
|
|
138
|
+
),
|
|
139
|
+
),
|
|
140
|
+
],
|
|
141
|
+
options={
|
|
142
|
+
"abstract": False,
|
|
143
|
+
},
|
|
144
|
+
),
|
|
145
|
+
migrations.CreateModel(
|
|
146
|
+
name="SyncSession",
|
|
147
|
+
fields=[
|
|
148
|
+
(
|
|
149
|
+
"id",
|
|
150
|
+
morango.models.fields.uuids.UUIDField(
|
|
151
|
+
primary_key=True, serialize=False
|
|
152
|
+
),
|
|
153
|
+
),
|
|
154
|
+
(
|
|
155
|
+
"start_timestamp",
|
|
156
|
+
models.DateTimeField(default=django.utils.timezone.now),
|
|
157
|
+
),
|
|
158
|
+
("last_activity_timestamp", models.DateTimeField(blank=True)),
|
|
159
|
+
("active", models.BooleanField(default=True)),
|
|
160
|
+
(
|
|
161
|
+
"connection_kind",
|
|
162
|
+
models.CharField(
|
|
163
|
+
choices=[('network', 'Network'), ('disk', 'Disk')],
|
|
164
|
+
max_length=10,
|
|
165
|
+
),
|
|
166
|
+
),
|
|
167
|
+
(
|
|
168
|
+
"connection_path",
|
|
169
|
+
models.CharField(
|
|
170
|
+
max_length=1000,
|
|
171
|
+
),
|
|
172
|
+
),
|
|
173
|
+
("is_server", models.BooleanField(default=False)),
|
|
174
|
+
("client_instance", models.TextField(default="{}")),
|
|
175
|
+
("client_ip", models.CharField(blank=True, max_length=100)),
|
|
176
|
+
(
|
|
177
|
+
"profile",
|
|
178
|
+
models.CharField(
|
|
179
|
+
max_length=40,
|
|
180
|
+
),
|
|
181
|
+
),
|
|
182
|
+
("server_instance", models.TextField(default="{}")),
|
|
183
|
+
("server_ip", models.CharField(blank=True, max_length=100)),
|
|
184
|
+
],
|
|
185
|
+
),
|
|
186
|
+
migrations.CreateModel(
|
|
187
|
+
name="TransferSession",
|
|
188
|
+
fields=[
|
|
189
|
+
(
|
|
190
|
+
"id",
|
|
191
|
+
morango.models.fields.uuids.UUIDField(
|
|
192
|
+
primary_key=True, serialize=False
|
|
193
|
+
),
|
|
194
|
+
),
|
|
195
|
+
("filter", models.TextField()),
|
|
196
|
+
("push", models.BooleanField()),
|
|
197
|
+
("active", models.BooleanField(default=True)),
|
|
198
|
+
("records_total", models.IntegerField(blank=True, null=True)),
|
|
199
|
+
(
|
|
200
|
+
"sync_session",
|
|
201
|
+
models.ForeignKey(
|
|
202
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
203
|
+
to="morango.syncsession",
|
|
204
|
+
),
|
|
205
|
+
),
|
|
206
|
+
(
|
|
207
|
+
"last_activity_timestamp",
|
|
208
|
+
models.DateTimeField(
|
|
209
|
+
blank=True,
|
|
210
|
+
),
|
|
211
|
+
),
|
|
212
|
+
("client_fsic", models.TextField(blank=True, default="{}")),
|
|
213
|
+
("records_transferred", models.IntegerField(default=0)),
|
|
214
|
+
("server_fsic", models.TextField(blank=True, default="{}")),
|
|
215
|
+
(
|
|
216
|
+
"start_timestamp",
|
|
217
|
+
models.DateTimeField(default=django.utils.timezone.now),
|
|
218
|
+
),
|
|
219
|
+
(
|
|
220
|
+
"bytes_received",
|
|
221
|
+
models.BigIntegerField(blank=True, default=0, null=True),
|
|
222
|
+
),
|
|
223
|
+
(
|
|
224
|
+
"bytes_sent",
|
|
225
|
+
models.BigIntegerField(blank=True, default=0, null=True),
|
|
226
|
+
),
|
|
227
|
+
(
|
|
228
|
+
"transfer_stage",
|
|
229
|
+
models.CharField(
|
|
230
|
+
blank=True,
|
|
231
|
+
choices=[
|
|
232
|
+
("initializing", "Initializing"),
|
|
233
|
+
("serializing", "Serializing"),
|
|
234
|
+
("queuing", "Queuing"),
|
|
235
|
+
("transferring", "Transferring"),
|
|
236
|
+
("dequeuing", "Dequeuing"),
|
|
237
|
+
("deserializing", "Deserializing"),
|
|
238
|
+
("cleanup", "Cleanup"),
|
|
239
|
+
],
|
|
240
|
+
max_length=20,
|
|
241
|
+
null=True,
|
|
242
|
+
),
|
|
243
|
+
),
|
|
244
|
+
(
|
|
245
|
+
"transfer_stage_status",
|
|
246
|
+
models.CharField(
|
|
247
|
+
blank=True,
|
|
248
|
+
choices=[
|
|
249
|
+
("pending", "Pending"),
|
|
250
|
+
("started", "Started"),
|
|
251
|
+
("completed", "Completed"),
|
|
252
|
+
("errored", "Errored"),
|
|
253
|
+
],
|
|
254
|
+
max_length=20,
|
|
255
|
+
null=True,
|
|
256
|
+
),
|
|
257
|
+
),
|
|
258
|
+
],
|
|
259
|
+
),
|
|
260
|
+
migrations.CreateModel(
|
|
261
|
+
name="ScopeDefinition",
|
|
262
|
+
fields=[
|
|
263
|
+
("profile", models.CharField(max_length=20)),
|
|
264
|
+
("version", models.IntegerField()),
|
|
265
|
+
(
|
|
266
|
+
"id",
|
|
267
|
+
models.CharField(max_length=20, primary_key=True, serialize=False),
|
|
268
|
+
),
|
|
269
|
+
("description", models.TextField()),
|
|
270
|
+
("read_filter_template", models.TextField()),
|
|
271
|
+
("write_filter_template", models.TextField()),
|
|
272
|
+
("read_write_filter_template", models.TextField()),
|
|
273
|
+
(
|
|
274
|
+
"primary_scope_param_key",
|
|
275
|
+
models.CharField(blank=True, max_length=20),
|
|
276
|
+
),
|
|
277
|
+
],
|
|
278
|
+
),
|
|
279
|
+
migrations.CreateModel(
|
|
280
|
+
name="RecordMaxCounterBuffer",
|
|
281
|
+
fields=[
|
|
282
|
+
(
|
|
283
|
+
"id",
|
|
284
|
+
models.AutoField(
|
|
285
|
+
auto_created=True,
|
|
286
|
+
primary_key=True,
|
|
287
|
+
serialize=False,
|
|
288
|
+
verbose_name="ID",
|
|
289
|
+
),
|
|
290
|
+
),
|
|
291
|
+
("instance_id", morango.models.fields.uuids.UUIDField()),
|
|
292
|
+
("counter", models.IntegerField()),
|
|
293
|
+
("model_uuid", morango.models.fields.uuids.UUIDField(db_index=True)),
|
|
294
|
+
(
|
|
295
|
+
"transfer_session",
|
|
296
|
+
models.ForeignKey(
|
|
297
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
298
|
+
to="morango.transfersession",
|
|
299
|
+
),
|
|
300
|
+
),
|
|
301
|
+
],
|
|
302
|
+
options={
|
|
303
|
+
"abstract": False,
|
|
304
|
+
},
|
|
305
|
+
),
|
|
306
|
+
migrations.CreateModel(
|
|
307
|
+
name="Certificate",
|
|
308
|
+
fields=[
|
|
309
|
+
(
|
|
310
|
+
"id",
|
|
311
|
+
morango.models.fields.uuids.UUIDField(
|
|
312
|
+
primary_key=True, serialize=False
|
|
313
|
+
),
|
|
314
|
+
),
|
|
315
|
+
("profile", models.CharField(max_length=20)),
|
|
316
|
+
("scope_version", models.IntegerField()),
|
|
317
|
+
("scope_params", models.TextField()),
|
|
318
|
+
("public_key", morango.models.fields.crypto.PublicKeyField()),
|
|
319
|
+
("serialized", models.TextField()),
|
|
320
|
+
("signature", models.TextField()),
|
|
321
|
+
(
|
|
322
|
+
"private_key",
|
|
323
|
+
morango.models.fields.crypto.PrivateKeyField(blank=True, null=True),
|
|
324
|
+
),
|
|
325
|
+
("lft", models.PositiveIntegerField(editable=False)),
|
|
326
|
+
("rght", models.PositiveIntegerField(editable=False)),
|
|
327
|
+
("tree_id", models.PositiveIntegerField(db_index=True, editable=False)),
|
|
328
|
+
("level", models.PositiveIntegerField(editable=False)),
|
|
329
|
+
(
|
|
330
|
+
"parent",
|
|
331
|
+
models.ForeignKey(
|
|
332
|
+
blank=True,
|
|
333
|
+
null=True,
|
|
334
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
335
|
+
to="morango.certificate",
|
|
336
|
+
),
|
|
337
|
+
),
|
|
338
|
+
(
|
|
339
|
+
"scope_definition",
|
|
340
|
+
models.ForeignKey(
|
|
341
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
342
|
+
to="morango.scopedefinition",
|
|
343
|
+
),
|
|
344
|
+
),
|
|
345
|
+
],
|
|
346
|
+
options={
|
|
347
|
+
"abstract": False,
|
|
348
|
+
},
|
|
349
|
+
),
|
|
350
|
+
migrations.CreateModel(
|
|
351
|
+
name="RecordMaxCounter",
|
|
352
|
+
fields=[
|
|
353
|
+
(
|
|
354
|
+
"id",
|
|
355
|
+
models.AutoField(
|
|
356
|
+
auto_created=True,
|
|
357
|
+
primary_key=True,
|
|
358
|
+
serialize=False,
|
|
359
|
+
verbose_name="ID",
|
|
360
|
+
),
|
|
361
|
+
),
|
|
362
|
+
("instance_id", morango.models.fields.uuids.UUIDField()),
|
|
363
|
+
("counter", models.IntegerField()),
|
|
364
|
+
(
|
|
365
|
+
"store_model",
|
|
366
|
+
models.ForeignKey(
|
|
367
|
+
on_delete=django.db.models.deletion.CASCADE, to="morango.store"
|
|
368
|
+
),
|
|
369
|
+
),
|
|
370
|
+
],
|
|
371
|
+
options={
|
|
372
|
+
"unique_together": {("store_model", "instance_id")},
|
|
373
|
+
},
|
|
374
|
+
),
|
|
375
|
+
migrations.AlterModelManagers(
|
|
376
|
+
name="certificate",
|
|
377
|
+
managers=[
|
|
378
|
+
("objects", django.db.models.manager.Manager()),
|
|
379
|
+
],
|
|
380
|
+
),
|
|
381
|
+
migrations.AlterField(
|
|
382
|
+
model_name="certificate",
|
|
383
|
+
name="id",
|
|
384
|
+
field=morango.models.fields.uuids.UUIDField(
|
|
385
|
+
editable=False, primary_key=True, serialize=False
|
|
386
|
+
),
|
|
387
|
+
),
|
|
388
|
+
migrations.AlterModelManagers(
|
|
389
|
+
name="certificate",
|
|
390
|
+
managers=[],
|
|
391
|
+
),
|
|
392
|
+
migrations.RenameField(
|
|
393
|
+
model_name="certificate",
|
|
394
|
+
old_name="private_key",
|
|
395
|
+
new_name="_private_key",
|
|
396
|
+
),
|
|
397
|
+
migrations.AlterField(
|
|
398
|
+
model_name="certificate",
|
|
399
|
+
name="_private_key",
|
|
400
|
+
field=morango.models.fields.crypto.PrivateKeyField(
|
|
401
|
+
blank=True, db_column="private_key", null=True
|
|
402
|
+
),
|
|
403
|
+
),
|
|
404
|
+
migrations.CreateModel(
|
|
405
|
+
name="Nonce",
|
|
406
|
+
fields=[
|
|
407
|
+
(
|
|
408
|
+
"id",
|
|
409
|
+
morango.models.fields.uuids.UUIDField(
|
|
410
|
+
editable=False, primary_key=True, serialize=False
|
|
411
|
+
),
|
|
412
|
+
),
|
|
413
|
+
("timestamp", models.DateTimeField(default=django.utils.timezone.now)),
|
|
414
|
+
("ip", models.CharField(blank=True, max_length=100)),
|
|
415
|
+
],
|
|
416
|
+
options={
|
|
417
|
+
"abstract": False,
|
|
418
|
+
},
|
|
419
|
+
),
|
|
420
|
+
migrations.AddField(
|
|
421
|
+
model_name="certificate",
|
|
422
|
+
name="salt",
|
|
423
|
+
field=models.CharField(blank=True, max_length=32),
|
|
424
|
+
),
|
|
425
|
+
migrations.AddField(
|
|
426
|
+
model_name="syncsession",
|
|
427
|
+
name="client_certificate",
|
|
428
|
+
field=models.ForeignKey(
|
|
429
|
+
blank=True,
|
|
430
|
+
null=True,
|
|
431
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
432
|
+
related_name="syncsessions_client",
|
|
433
|
+
to="morango.certificate",
|
|
434
|
+
),
|
|
435
|
+
),
|
|
436
|
+
migrations.AddField(
|
|
437
|
+
model_name="syncsession",
|
|
438
|
+
name="server_certificate",
|
|
439
|
+
field=models.ForeignKey(
|
|
440
|
+
blank=True,
|
|
441
|
+
null=True,
|
|
442
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
443
|
+
related_name="syncsessions_server",
|
|
444
|
+
to="morango.certificate",
|
|
445
|
+
),
|
|
446
|
+
),
|
|
447
|
+
migrations.CreateModel(
|
|
448
|
+
name="InstanceIDModel",
|
|
449
|
+
fields=[
|
|
450
|
+
(
|
|
451
|
+
"id",
|
|
452
|
+
morango.models.fields.uuids.UUIDField(
|
|
453
|
+
editable=False, primary_key=True, serialize=False
|
|
454
|
+
),
|
|
455
|
+
),
|
|
456
|
+
("platform", models.TextField()),
|
|
457
|
+
("hostname", models.TextField()),
|
|
458
|
+
("sysversion", models.TextField()),
|
|
459
|
+
("node_id", models.CharField(blank=True, max_length=20)),
|
|
460
|
+
("counter", models.IntegerField(default=0)),
|
|
461
|
+
("current", models.BooleanField(default=True)),
|
|
462
|
+
("db_path", models.CharField(max_length=1000)),
|
|
463
|
+
(
|
|
464
|
+
"database",
|
|
465
|
+
models.ForeignKey(
|
|
466
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
467
|
+
to="morango.databaseidmodel",
|
|
468
|
+
),
|
|
469
|
+
),
|
|
470
|
+
("system_id", models.CharField(blank=True, max_length=100)),
|
|
471
|
+
],
|
|
472
|
+
options={
|
|
473
|
+
"abstract": False,
|
|
474
|
+
},
|
|
475
|
+
),
|
|
476
|
+
migrations.CreateModel(
|
|
477
|
+
name="SharedKey",
|
|
478
|
+
fields=[
|
|
479
|
+
(
|
|
480
|
+
"id",
|
|
481
|
+
models.AutoField(
|
|
482
|
+
auto_created=True,
|
|
483
|
+
primary_key=True,
|
|
484
|
+
serialize=False,
|
|
485
|
+
verbose_name="ID",
|
|
486
|
+
),
|
|
487
|
+
),
|
|
488
|
+
("public_key", morango.models.fields.crypto.PublicKeyField()),
|
|
489
|
+
("private_key", morango.models.fields.crypto.PrivateKeyField()),
|
|
490
|
+
("current", models.BooleanField(default=True)),
|
|
491
|
+
],
|
|
492
|
+
),
|
|
493
|
+
migrations.CreateModel(
|
|
494
|
+
name="HardDeletedModels",
|
|
495
|
+
fields=[
|
|
496
|
+
(
|
|
497
|
+
"id",
|
|
498
|
+
morango.models.fields.uuids.UUIDField(
|
|
499
|
+
primary_key=True, serialize=False
|
|
500
|
+
),
|
|
501
|
+
),
|
|
502
|
+
("profile", models.CharField(max_length=40)),
|
|
503
|
+
],
|
|
504
|
+
),
|
|
505
|
+
migrations.CreateModel(
|
|
506
|
+
name="Buffer",
|
|
507
|
+
fields=[
|
|
508
|
+
(
|
|
509
|
+
"id",
|
|
510
|
+
models.AutoField(
|
|
511
|
+
auto_created=True,
|
|
512
|
+
primary_key=True,
|
|
513
|
+
serialize=False,
|
|
514
|
+
verbose_name="ID",
|
|
515
|
+
),
|
|
516
|
+
),
|
|
517
|
+
("serialized", models.TextField(blank=True)),
|
|
518
|
+
("deleted", models.BooleanField(default=False)),
|
|
519
|
+
("last_saved_instance", morango.models.fields.uuids.UUIDField()),
|
|
520
|
+
("last_saved_counter", models.IntegerField()),
|
|
521
|
+
("model_name", models.CharField(max_length=40)),
|
|
522
|
+
("profile", models.CharField(max_length=40)),
|
|
523
|
+
("partition", models.TextField()),
|
|
524
|
+
("model_uuid", morango.models.fields.uuids.UUIDField()),
|
|
525
|
+
(
|
|
526
|
+
"transfer_session",
|
|
527
|
+
models.ForeignKey(
|
|
528
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
529
|
+
to="morango.transfersession",
|
|
530
|
+
),
|
|
531
|
+
),
|
|
532
|
+
("conflicting_serialized_data", models.TextField(blank=True)),
|
|
533
|
+
("_self_ref_fk", models.CharField(blank=True, max_length=32)),
|
|
534
|
+
(
|
|
535
|
+
"source_id",
|
|
536
|
+
models.CharField(
|
|
537
|
+
max_length=96,
|
|
538
|
+
),
|
|
539
|
+
),
|
|
540
|
+
("hard_deleted", models.BooleanField(default=False)),
|
|
541
|
+
],
|
|
542
|
+
options={
|
|
543
|
+
"abstract": False,
|
|
544
|
+
"unique_together": {("transfer_session", "model_uuid")},
|
|
545
|
+
},
|
|
546
|
+
),
|
|
547
|
+
migrations.AddField(
|
|
548
|
+
model_name="syncsession",
|
|
549
|
+
name="extra_fields",
|
|
550
|
+
field=models.TextField(default="{}"),
|
|
551
|
+
),
|
|
552
|
+
migrations.AddField(
|
|
553
|
+
model_name="syncsession",
|
|
554
|
+
name="process_id",
|
|
555
|
+
field=models.IntegerField(blank=True, null=True),
|
|
556
|
+
),
|
|
557
|
+
migrations.AddIndex(
|
|
558
|
+
model_name="store",
|
|
559
|
+
index=models.Index(
|
|
560
|
+
fields=["partition"], name="idx_morango_store_partition"
|
|
561
|
+
),
|
|
562
|
+
),
|
|
563
|
+
migrations.RenameField(
|
|
564
|
+
model_name="syncsession",
|
|
565
|
+
old_name="client_instance",
|
|
566
|
+
new_name="client_instance_json",
|
|
567
|
+
),
|
|
568
|
+
migrations.RenameField(
|
|
569
|
+
model_name="syncsession",
|
|
570
|
+
old_name="server_instance",
|
|
571
|
+
new_name="server_instance_json",
|
|
572
|
+
),
|
|
573
|
+
migrations.AddField(
|
|
574
|
+
model_name="syncsession",
|
|
575
|
+
name="client_instance_id",
|
|
576
|
+
field=models.UUIDField(blank=True, null=True),
|
|
577
|
+
),
|
|
578
|
+
migrations.AddField(
|
|
579
|
+
model_name="syncsession",
|
|
580
|
+
name="server_instance_id",
|
|
581
|
+
field=models.UUIDField(blank=True, null=True),
|
|
582
|
+
),
|
|
583
|
+
]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Generated by Django 3.2.24 on 2024-10-18 23:18
|
|
2
|
+
from django.db import migrations
|
|
3
|
+
from django.db import models
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
|
|
8
|
+
dependencies = [
|
|
9
|
+
("morango", "0001_squashed_0024_auto_20240129_1757"),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.AddIndex(
|
|
14
|
+
model_name="store",
|
|
15
|
+
index=models.Index(
|
|
16
|
+
condition=models.Q(("dirty_bit", True)),
|
|
17
|
+
fields=["profile", "model_name", "partition", "dirty_bit"],
|
|
18
|
+
name="idx_morango_deserialize",
|
|
19
|
+
),
|
|
20
|
+
),
|
|
21
|
+
]
|
morango/models/core.py
CHANGED
|
@@ -450,6 +450,7 @@ class Store(AbstractStore):
|
|
|
450
450
|
class Meta:
|
|
451
451
|
indexes = [
|
|
452
452
|
models.Index(fields=["partition"], name="idx_morango_store_partition"),
|
|
453
|
+
models.Index(fields=["profile", "model_name", "partition", "dirty_bit"], condition=models.Q(dirty_bit=True), name="idx_morango_deserialize"),
|
|
453
454
|
]
|
|
454
455
|
|
|
455
456
|
def _deserialize_store_model(self, fk_cache, defer_fks=False): # noqa: C901
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: morango
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.2
|
|
4
4
|
Summary: Pure Python sqlite-based Django DB replication engine.
|
|
5
5
|
Home-page: https://github.com/learningequality/morango
|
|
6
6
|
Author: Learning Equality
|
|
@@ -18,15 +18,17 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.9
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.10
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
-
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Requires-Python: >=3.6, <3.14
|
|
22
24
|
Description-Content-Type: text/markdown
|
|
23
25
|
License-File: LICENSE
|
|
24
26
|
License-File: AUTHORS.md
|
|
25
|
-
Requires-Dist: django
|
|
26
|
-
Requires-Dist: django-mptt
|
|
27
|
-
Requires-Dist: rsa
|
|
28
|
-
Requires-Dist: djangorestframework
|
|
29
|
-
Requires-Dist: django-ipware
|
|
27
|
+
Requires-Dist: django<4,>=3
|
|
28
|
+
Requires-Dist: django-mptt>0.10.0
|
|
29
|
+
Requires-Dist: rsa<3.5,>=3.4.2
|
|
30
|
+
Requires-Dist: djangorestframework>3.10
|
|
31
|
+
Requires-Dist: django-ipware==4.0.2
|
|
30
32
|
Requires-Dist: requests
|
|
31
33
|
Requires-Dist: ifcfg
|
|
32
34
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
morango/__init__.py,sha256=
|
|
2
|
-
morango/apps.py,sha256=
|
|
1
|
+
morango/__init__.py,sha256=B7GiO0rd49YwtLYjvPg4lmCZEDlMTonslQKdSImaMJk,22
|
|
2
|
+
morango/apps.py,sha256=bs_LaTt1038Oh0OOWqaZKpF8rL9cg8rqW4hftIILPw8,559
|
|
3
3
|
morango/errors.py,sha256=okjt7FqSHIf3x9SmnmoW6aqNJ_g7Ye3Fx7tuQSNUYEI,1223
|
|
4
4
|
morango/proquint.py,sha256=YRjgceaYD_wDE8R-21AK5m6MSzbarIBP_kDxJ_gHsbQ,3679
|
|
5
5
|
morango/registry.py,sha256=uaB2qdVMiWps_eB7F1r43qf_5rteUvgRb6fcEYdCt2Y,9430
|
|
@@ -16,13 +16,15 @@ morango/constants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
|
|
|
16
16
|
morango/constants/api_urls.py,sha256=mmGJyyVtrMxjIMAF2iBHbjGVndsvW_z1IQH-GhW3L-g,453
|
|
17
17
|
morango/constants/capabilities.py,sha256=KaTQpfpg6l4G0aGXJnOKi7ibbshdg-1fA9aLl-Qc_Oc,166
|
|
18
18
|
morango/constants/settings.py,sha256=dygRwRZhYkTdRhEltc5QqdoQBLkuZ-f9fdFMVrCaDpQ,2009
|
|
19
|
-
morango/constants/transfer_stages.py,sha256=
|
|
20
|
-
morango/constants/transfer_statuses.py,sha256=
|
|
19
|
+
morango/constants/transfer_stages.py,sha256=mp-1V22ba0gKdylJgnUJ8Jh-Qs9-3-LsY_Q_cxRUgmI,1378
|
|
20
|
+
morango/constants/transfer_statuses.py,sha256=BU3_dx7RxXpWF3pDjC9JsDe2xzKSGiqZFVBbdIY7_aQ,509
|
|
21
21
|
morango/management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
22
|
morango/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
23
|
morango/management/commands/cleanupsyncs.py,sha256=Huaz8etLNbmW8X-Vy4x1QY801JYln0iyaeUTJF2L3kE,4833
|
|
24
24
|
morango/migrations/0001_initial.py,sha256=ZFEKusKCIUsgUuHpF-eWqEqu7FrhO2ikkfu5KfYfXx0,11892
|
|
25
|
+
morango/migrations/0001_squashed_0024_auto_20240129_1757.py,sha256=K-71iKz9cKpb-zrxuoDJVWafZM3U_hM6EpX6aNzsFjM,21770
|
|
25
26
|
morango/migrations/0002_auto_20170511_0400.py,sha256=9EQcTl2xHd-rwx_NWCLzo8GU3u7MFA3WOryyKYEbHUw,2263
|
|
27
|
+
morango/migrations/0002_store_idx_morango_deserialize.py,sha256=AbfcuoovuViGRugR5lH86E3JgfgBa_4koTp5vMiUAh8,568
|
|
26
28
|
morango/migrations/0003_auto_20170519_0543.py,sha256=5YfHW6IcT57tgaXW6pnWHmL6kfgauTW2nao9zQr3nP8,641
|
|
27
29
|
morango/migrations/0004_auto_20170520_2112.py,sha256=T7rGjSPXUGnanDr5SJKj5SHZEQYSIaND60vRaK3DObw,517
|
|
28
30
|
morango/migrations/0005_auto_20170629_2139.py,sha256=PL1I3wybrDgDxY8hSmZmUfpxOulr6O2ywui7ue_dvKw,654
|
|
@@ -48,7 +50,7 @@ morango/migrations/0024_auto_20240129_1757.py,sha256=Buy1T4PiTFo8zP7p2HY-3gmiJur
|
|
|
48
50
|
morango/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
49
51
|
morango/models/__init__.py,sha256=ws6VwRPs7iKLRfFSuRpUESTZlGEmSk0Nv61chh-Gn2Q,1722
|
|
50
52
|
morango/models/certificates.py,sha256=XVq6tKOwLZjq2hw0j5hrBQGsm5H-GSPZ5ZVOg9An9Hw,15110
|
|
51
|
-
morango/models/core.py,sha256=
|
|
53
|
+
morango/models/core.py,sha256=S7hfI8Bo60qvVr2Pr_VRnFUpSqAtV-WvBUDlk0dtWEE,38762
|
|
52
54
|
morango/models/fsic_utils.py,sha256=B9RM-uPZFvEXWbsPeeit5qA21gKGpA0NkKCLFIdNI_0,7130
|
|
53
55
|
morango/models/manager.py,sha256=fzzX7k8qV5W5dMBb0ASOBNRJRpvQZbEG1hgyuMtzt4g,163
|
|
54
56
|
morango/models/query.py,sha256=eHcf9PYYEDShN6lRng7Ow9RJwNFPdKI1hDbVUXeyl9U,869
|
|
@@ -69,9 +71,9 @@ morango/sync/backends/base.py,sha256=zQP5hOB2Qw0qv0G00LXFHl2GQ3b0bheyujdNVl5rT-8
|
|
|
69
71
|
morango/sync/backends/postgres.py,sha256=N0IeXN67AkdQKlD20b8LQZ1ocdarapL8pqu8FQAc6lM,19850
|
|
70
72
|
morango/sync/backends/sqlite.py,sha256=vg7kWFIF346-NjVwexYfjYbrrOyzzvcCmk5uUkqhabw,12850
|
|
71
73
|
morango/sync/backends/utils.py,sha256=UvyYByzRenOwtDvLPO_1wIOE8Yr88FnuAM2c4VSk7uQ,5145
|
|
72
|
-
morango-0.8.
|
|
73
|
-
morango-0.8.
|
|
74
|
-
morango-0.8.
|
|
75
|
-
morango-0.8.
|
|
76
|
-
morango-0.8.
|
|
77
|
-
morango-0.8.
|
|
74
|
+
morango-0.8.2.dist-info/AUTHORS.md,sha256=9Ussd3Fq3RPjHyQT_3AyGss5jiVbn858WQuIBOi1ajI,276
|
|
75
|
+
morango-0.8.2.dist-info/LICENSE,sha256=RkI6MjmrrTKa3aoPAVyk9QdeLZclcrKds6FH3phRSRU,1074
|
|
76
|
+
morango-0.8.2.dist-info/METADATA,sha256=4Wl0oDOYp832UVBsT_2WfEeh6eN9B7tNcD1QlzSUwUk,2592
|
|
77
|
+
morango-0.8.2.dist-info/WHEEL,sha256=fS9sRbCBHs7VFcwJLnLXN1MZRR0_TVTxvXKzOnaSFs8,110
|
|
78
|
+
morango-0.8.2.dist-info/top_level.txt,sha256=pzREWN0EeEq3yHDRast9XI081Ow_rtcm7WV0ZQTlIPY,8
|
|
79
|
+
morango-0.8.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|