|
| 1 | +# Generated by Django 5.2.13 on 2026-04-23 14:15 |
| 2 | + |
| 3 | +import re |
| 4 | + |
| 5 | +import django.core.validators |
| 6 | +import django.db.models.lookups |
| 7 | +from django.conf import settings |
| 8 | +from django.db import migrations, models |
| 9 | + |
| 10 | +import openedx_django_lib.fields |
| 11 | + |
| 12 | + |
| 13 | +class Migration(migrations.Migration): |
| 14 | + |
| 15 | + dependencies = [ |
| 16 | + ('openedx_content', '0012_rename_componentversionmedia_key_to_path'), |
| 17 | + migrations.swappable_dependency(settings.AUTH_USER_MODEL), |
| 18 | + ] |
| 19 | + |
| 20 | + operations = [ |
| 21 | + migrations.RemoveConstraint( |
| 22 | + model_name='component', |
| 23 | + name='oel_component_code_regex', |
| 24 | + ), |
| 25 | + migrations.RemoveConstraint( |
| 26 | + model_name='container', |
| 27 | + name='oel_container_code_regex', |
| 28 | + ), |
| 29 | + migrations.AlterField( |
| 30 | + model_name='collection', |
| 31 | + name='collection_code', |
| 32 | + field=openedx_django_lib.fields.MultiCollationCharField(db_collations={'mysql': 'utf8mb4_bin', 'sqlite': 'BINARY'}, max_length=255, validators=[django.core.validators.RegexValidator(re.compile('^[a-zA-Z0-9_.-]+\\Z'), 'Enter a valid "code name" consisting of latin letters (A-Z, a-z), numbers, underscores, hyphens, or periods.', 'invalid')]), |
| 33 | + ), |
| 34 | + migrations.AlterField( |
| 35 | + model_name='component', |
| 36 | + name='component_code', |
| 37 | + field=openedx_django_lib.fields.MultiCollationCharField(db_collations={'mysql': 'utf8mb4_bin', 'sqlite': 'BINARY'}, max_length=255, validators=[django.core.validators.RegexValidator(re.compile('^[\\w.-]+\\Z'), 'Enter a valid "code name" consisting of any letters, numbers, underscores, hyphens, or periods.', 'invalid')]), |
| 38 | + ), |
| 39 | + migrations.AlterField( |
| 40 | + model_name='container', |
| 41 | + name='container_code', |
| 42 | + field=openedx_django_lib.fields.MultiCollationCharField(db_collations={'mysql': 'utf8mb4_bin', 'sqlite': 'BINARY'}, max_length=255, validators=[django.core.validators.RegexValidator(re.compile('^[\\w.-]+\\Z'), 'Enter a valid "code name" consisting of any letters, numbers, underscores, hyphens, or periods.', 'invalid')]), |
| 43 | + ), |
| 44 | + migrations.AddConstraint( |
| 45 | + model_name='component', |
| 46 | + constraint=models.CheckConstraint(condition=django.db.models.lookups.Regex(models.F('component_code'), '^[\\w.-]+\\Z'), name='oel_component_code_regex', violation_error_message='Enter a valid "code name" consisting of any letters, numbers, underscores, hyphens, or periods.'), |
| 47 | + ), |
| 48 | + migrations.AddConstraint( |
| 49 | + model_name='container', |
| 50 | + constraint=models.CheckConstraint(condition=django.db.models.lookups.Regex(models.F('container_code'), '^[\\w.-]+\\Z'), name='oel_container_code_regex', violation_error_message='Enter a valid "code name" consisting of any letters, numbers, underscores, hyphens, or periods.'), |
| 51 | + ), |
| 52 | + migrations.AlterConstraint( |
| 53 | + model_name='collection', |
| 54 | + name='oel_coll_collection_code_regex', |
| 55 | + constraint=models.CheckConstraint(condition=django.db.models.lookups.Regex(models.F('collection_code'), '^[a-zA-Z0-9_.-]+\\Z'), name='oel_coll_collection_code_regex', violation_error_message='Enter a valid "code name" consisting of latin letters (A-Z, a-z), numbers, underscores, hyphens, or periods.'), |
| 56 | + ), |
| 57 | + ] |
0 commit comments