mirror of
https://github.com/pretix/pretix.git
synced 2026-05-16 17:03:58 +00:00
Add OrderSyncQueue migrations
This commit is contained in:
41
src/pretix/base/migrations/0277_ordersyncqueue.py
Normal file
41
src/pretix/base/migrations/0277_ordersyncqueue.py
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# Generated by Django 4.2.16 on 2025-02-28 12:06
|
||||||
|
|
||||||
|
import django.db.models.deletion
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("pretixbase", "0276_item_hidden_if_item_available_mode"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name="OrderSyncQueue",
|
||||||
|
fields=[
|
||||||
|
(
|
||||||
|
"id",
|
||||||
|
models.BigAutoField(
|
||||||
|
auto_created=True, primary_key=True, serialize=False
|
||||||
|
),
|
||||||
|
),
|
||||||
|
("sync_provider", models.CharField(max_length=128)),
|
||||||
|
("triggered_by", models.CharField(max_length=128)),
|
||||||
|
("triggered", models.DateTimeField(auto_now_add=True)),
|
||||||
|
("failed_attempts", models.PositiveIntegerField(default=0)),
|
||||||
|
("not_before", models.DateTimeField(blank=True, null=True)),
|
||||||
|
(
|
||||||
|
"order",
|
||||||
|
models.ForeignKey(
|
||||||
|
on_delete=django.db.models.deletion.CASCADE,
|
||||||
|
related_name="queued_sync_jobs",
|
||||||
|
to="pretixbase.order",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
"unique_together": {("order", "sync_provider")},
|
||||||
|
},
|
||||||
|
),
|
||||||
|
]
|
||||||
59
src/pretix/base/migrations/0278_ordersynclink.py
Normal file
59
src/pretix/base/migrations/0278_ordersynclink.py
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
# Generated by Django 4.2.16 on 2025-03-04 14:12
|
||||||
|
|
||||||
|
import django.db.models.deletion
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("pretixbase", "0277_ordersyncqueue"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name="OrderSyncLink",
|
||||||
|
fields=[
|
||||||
|
(
|
||||||
|
"id",
|
||||||
|
models.BigAutoField(
|
||||||
|
auto_created=True, primary_key=True, serialize=False
|
||||||
|
),
|
||||||
|
),
|
||||||
|
("sync_provider", models.CharField(max_length=128)),
|
||||||
|
("external_object_type", models.CharField(max_length=128)),
|
||||||
|
("external_pk_name", models.CharField(max_length=128)),
|
||||||
|
("external_pk_value", models.CharField(max_length=128)),
|
||||||
|
("external_link_href", models.CharField(max_length=255, null=True)),
|
||||||
|
(
|
||||||
|
"external_link_display_name",
|
||||||
|
models.CharField(max_length=255, null=True),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"order",
|
||||||
|
models.ForeignKey(
|
||||||
|
on_delete=django.db.models.deletion.CASCADE,
|
||||||
|
related_name="synced_objects",
|
||||||
|
to="pretixbase.order",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"order_position",
|
||||||
|
models.ForeignKey(
|
||||||
|
null=True,
|
||||||
|
on_delete=django.db.models.deletion.CASCADE,
|
||||||
|
related_name="synced_objects",
|
||||||
|
to="pretixbase.orderposition",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
"indexes": [
|
||||||
|
models.Index(
|
||||||
|
fields=["order", "sync_provider"],
|
||||||
|
name="pretixbase__order_i_23d278_idx",
|
||||||
|
)
|
||||||
|
],
|
||||||
|
},
|
||||||
|
),
|
||||||
|
]
|
||||||
22
src/pretix/base/migrations/0279_ordersynclink_timestamp.py
Normal file
22
src/pretix/base/migrations/0279_ordersynclink_timestamp.py
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# Generated by Django 4.2.16 on 2025-03-04 14:37
|
||||||
|
|
||||||
|
import django.utils.timezone
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("pretixbase", "0278_ordersynclink"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="ordersynclink",
|
||||||
|
name="timestamp",
|
||||||
|
field=models.DateTimeField(
|
||||||
|
auto_now_add=True, default=django.utils.timezone.now
|
||||||
|
),
|
||||||
|
preserve_default=False,
|
||||||
|
),
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user