30 lines
1.3 KiB
Python
30 lines
1.3 KiB
Python
# Generated by Django 5.2.2 on 2026-04-10 22:22
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('scouting', '0008_savedsearch'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='ExternalEntityMapping',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('source_name', models.CharField(max_length=80)),
|
|
('entity_type', models.CharField(choices=[('player', 'Player'), ('competition', 'Competition'), ('team', 'Team'), ('player_season', 'Player season')], max_length=30)),
|
|
('external_id', models.CharField(max_length=140)),
|
|
('object_id', models.PositiveBigIntegerField()),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
],
|
|
options={
|
|
'ordering': ['source_name', 'entity_type', 'external_id'],
|
|
'constraints': [models.UniqueConstraint(fields=('source_name', 'entity_type', 'external_id'), name='uniq_external_entity_mapping'), models.UniqueConstraint(fields=('source_name', 'entity_type', 'object_id'), name='uniq_external_entity_target')],
|
|
},
|
|
),
|
|
]
|