2024-02-02 19:26:06 -05:00
|
|
|
# Generated by Django 5.0.1 on 2024-02-02 22:07
|
|
|
|
|
2024-02-04 22:37:22 -05:00
|
|
|
from django.db import migrations, models
|
2024-02-02 19:26:06 -05:00
|
|
|
|
|
|
|
import django_db_views.migration_functions
|
|
|
|
import django_db_views.operations
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
|
|
("membershipworks", "0012_eventattendeestats_eventtickettype"),
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
2024-02-04 22:37:22 -05:00
|
|
|
migrations.CreateModel(
|
|
|
|
name="EventAttendee",
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.BigAutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
verbose_name="ID",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
("name", models.CharField(max_length=256)),
|
|
|
|
("email", models.CharField(max_length=256)),
|
|
|
|
("sum", models.FloatField()),
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
"managed": False,
|
|
|
|
},
|
|
|
|
),
|
2024-02-02 19:26:06 -05:00
|
|
|
django_db_views.operations.ViewRunPython(
|
|
|
|
code=django_db_views.migration_functions.ForwardViewMigration(
|
|
|
|
"SELECT eventext.event_ptr_id as event_id, tkt.uid, tkt.name, tkt.email, tkt.sum\n FROM\n membershipworks_eventext as eventext,\n JSON_TABLE(eventext.details, '$.usr[*]' COLUMNS (\n uid VARCHAR(24) PATH '$.uid',\n name VARCHAR(256) PATH '$.nam',\n email VARCHAR(256) PATH '$.eml',\n sum DOUBLE PATH '$.sum'\n )) as tkt",
|
|
|
|
"membershipworks_eventattendee",
|
|
|
|
engine="django.db.backends.mysql",
|
|
|
|
),
|
|
|
|
reverse_code=django_db_views.migration_functions.BackwardViewMigration(
|
|
|
|
"", "membershipworks_eventattendee", engine="django.db.backends.mysql"
|
|
|
|
),
|
|
|
|
atomic=False,
|
|
|
|
),
|
|
|
|
]
|