You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.3 KiB
36 lines
1.3 KiB
# Generated by Django 4.0.5 on 2022-06-20 11:19 |
|
|
|
from django.db import migrations, models |
|
import django.db.models.deletion |
|
import leftists.models |
|
|
|
|
|
class Migration(migrations.Migration): |
|
|
|
initial = True |
|
|
|
dependencies = [ |
|
] |
|
|
|
operations = [ |
|
migrations.CreateModel( |
|
name='Domain', |
|
fields=[ |
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
|
('fqdn', models.CharField(max_length=512, unique=True, verbose_name='FQDN')), |
|
], |
|
), |
|
migrations.CreateModel( |
|
name='ShortLink', |
|
fields=[ |
|
('slug', models.CharField(max_length=6, primary_key=True, serialize=False, unique=True)), |
|
('location', models.CharField(max_length=100, validators=[leftists.models.validate_location], verbose_name='short link')), |
|
('to', models.URLField(max_length=2500, verbose_name='redirect to')), |
|
('click_count', models.IntegerField(default=0)), |
|
('domain', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='links', to='leftists.domain')), |
|
], |
|
options={ |
|
'unique_together': {('domain', 'location')}, |
|
}, |
|
), |
|
]
|
|
|