|
| 1 | +# Generated by Django 4.2.23 on 2025-08-12 18:24 |
| 2 | + |
| 3 | +import django.contrib.postgres.fields |
| 4 | +import django.contrib.postgres.fields.jsonb |
| 5 | +from django.db import migrations, models |
| 6 | +import django.db.models.deletion |
| 7 | + |
| 8 | + |
| 9 | +class Migration(migrations.Migration): |
| 10 | + |
| 11 | + replaces = [ |
| 12 | + ("python", "0001_initial"), |
| 13 | + ("python", "0002_pythonpackagecontent_python_version"), |
| 14 | + ("python", "0003_new_sync_filters"), |
| 15 | + ("python", "0004_DATA_swap_distribution_model"), |
| 16 | + ("python", "0005_pythonpackagecontent_sha256"), |
| 17 | + ("python", "0006_pythonrepository_autopublish"), |
| 18 | + ("python", "0007_pythonpackagecontent_mv-2-1"), |
| 19 | + ("python", "0008_pythonpackagecontent_unique_sha256"), |
| 20 | + ("python", "0009_pythondistribution_allow_uploads"), |
| 21 | + ("python", "0010_update_json_field"), |
| 22 | + ] |
| 23 | + |
| 24 | + initial = True |
| 25 | + |
| 26 | + dependencies = [ |
| 27 | + ("core", "0091_systemid"), |
| 28 | + ] |
| 29 | + |
| 30 | + operations = [ |
| 31 | + migrations.CreateModel( |
| 32 | + name="PythonRemote", |
| 33 | + fields=[ |
| 34 | + ( |
| 35 | + "remote_ptr", |
| 36 | + models.OneToOneField( |
| 37 | + auto_created=True, |
| 38 | + on_delete=django.db.models.deletion.CASCADE, |
| 39 | + parent_link=True, |
| 40 | + primary_key=True, |
| 41 | + related_name="python_pythonremote", |
| 42 | + serialize=False, |
| 43 | + to="core.remote", |
| 44 | + ), |
| 45 | + ), |
| 46 | + ("prereleases", models.BooleanField(default=False)), |
| 47 | + ("includes", django.contrib.postgres.fields.jsonb.JSONField(default=list)), |
| 48 | + ("excludes", django.contrib.postgres.fields.jsonb.JSONField(default=list)), |
| 49 | + ( |
| 50 | + "exclude_platforms", |
| 51 | + django.contrib.postgres.fields.ArrayField( |
| 52 | + base_field=models.CharField(blank=True, max_length=10), |
| 53 | + choices=[ |
| 54 | + ("windows", "windows"), |
| 55 | + ("macos", "macos"), |
| 56 | + ("freebsd", "freebsd"), |
| 57 | + ("linux", "linux"), |
| 58 | + ], |
| 59 | + default=list, |
| 60 | + size=None, |
| 61 | + ), |
| 62 | + ), |
| 63 | + ("keep_latest_packages", models.IntegerField(default=0)), |
| 64 | + ( |
| 65 | + "package_types", |
| 66 | + django.contrib.postgres.fields.ArrayField( |
| 67 | + base_field=models.CharField(blank=True, max_length=15), |
| 68 | + choices=[ |
| 69 | + ("bdist_dmg", "bdist_dmg"), |
| 70 | + ("bdist_dumb", "bdist_dumb"), |
| 71 | + ("bdist_egg", "bdist_egg"), |
| 72 | + ("bdist_msi", "bdist_msi"), |
| 73 | + ("bdist_rpm", "bdist_rpm"), |
| 74 | + ("bdist_wheel", "bdist_wheel"), |
| 75 | + ("bdist_wininst", "bdist_wininst"), |
| 76 | + ("sdist", "sdist"), |
| 77 | + ], |
| 78 | + default=list, |
| 79 | + size=None, |
| 80 | + ), |
| 81 | + ), |
| 82 | + ], |
| 83 | + options={ |
| 84 | + "default_related_name": "%(app_label)s_%(model_name)s", |
| 85 | + }, |
| 86 | + bases=("core.remote",), |
| 87 | + ), |
| 88 | + migrations.CreateModel( |
| 89 | + name="PythonPublication", |
| 90 | + fields=[ |
| 91 | + ( |
| 92 | + "publication_ptr", |
| 93 | + models.OneToOneField( |
| 94 | + auto_created=True, |
| 95 | + on_delete=django.db.models.deletion.CASCADE, |
| 96 | + parent_link=True, |
| 97 | + primary_key=True, |
| 98 | + related_name="python_pythonpublication", |
| 99 | + serialize=False, |
| 100 | + to="core.publication", |
| 101 | + ), |
| 102 | + ), |
| 103 | + ], |
| 104 | + options={ |
| 105 | + "default_related_name": "%(app_label)s_%(model_name)s", |
| 106 | + }, |
| 107 | + bases=("core.publication",), |
| 108 | + ), |
| 109 | + migrations.CreateModel( |
| 110 | + name="PythonDistribution", |
| 111 | + fields=[ |
| 112 | + ( |
| 113 | + "distribution_ptr", |
| 114 | + models.OneToOneField( |
| 115 | + auto_created=True, |
| 116 | + on_delete=django.db.models.deletion.CASCADE, |
| 117 | + parent_link=True, |
| 118 | + primary_key=True, |
| 119 | + related_name="python_pythondistribution", |
| 120 | + serialize=False, |
| 121 | + to="core.distribution", |
| 122 | + ), |
| 123 | + ), |
| 124 | + ], |
| 125 | + options={ |
| 126 | + "default_related_name": "%(app_label)s_%(model_name)s", |
| 127 | + }, |
| 128 | + bases=("core.distribution",), |
| 129 | + ), |
| 130 | + migrations.CreateModel( |
| 131 | + name="PythonRepository", |
| 132 | + fields=[ |
| 133 | + ( |
| 134 | + "repository_ptr", |
| 135 | + models.OneToOneField( |
| 136 | + auto_created=True, |
| 137 | + on_delete=django.db.models.deletion.CASCADE, |
| 138 | + parent_link=True, |
| 139 | + primary_key=True, |
| 140 | + related_name="python_pythonrepository", |
| 141 | + serialize=False, |
| 142 | + to="core.repository", |
| 143 | + ), |
| 144 | + ), |
| 145 | + ("autopublish", models.BooleanField(default=False)), |
| 146 | + ], |
| 147 | + options={ |
| 148 | + "default_related_name": "%(app_label)s_%(model_name)s", |
| 149 | + }, |
| 150 | + bases=("core.repository",), |
| 151 | + ), |
| 152 | + migrations.CreateModel( |
| 153 | + name="PythonPackageContent", |
| 154 | + fields=[ |
| 155 | + ( |
| 156 | + "content_ptr", |
| 157 | + models.OneToOneField( |
| 158 | + auto_created=True, |
| 159 | + on_delete=django.db.models.deletion.CASCADE, |
| 160 | + parent_link=True, |
| 161 | + primary_key=True, |
| 162 | + related_name="python_pythonpackagecontent", |
| 163 | + serialize=False, |
| 164 | + to="core.content", |
| 165 | + ), |
| 166 | + ), |
| 167 | + ("filename", models.TextField(db_index=True)), |
| 168 | + ( |
| 169 | + "packagetype", |
| 170 | + models.TextField( |
| 171 | + choices=[ |
| 172 | + ("bdist_dmg", "bdist_dmg"), |
| 173 | + ("bdist_dumb", "bdist_dumb"), |
| 174 | + ("bdist_egg", "bdist_egg"), |
| 175 | + ("bdist_msi", "bdist_msi"), |
| 176 | + ("bdist_rpm", "bdist_rpm"), |
| 177 | + ("bdist_wheel", "bdist_wheel"), |
| 178 | + ("bdist_wininst", "bdist_wininst"), |
| 179 | + ("sdist", "sdist"), |
| 180 | + ] |
| 181 | + ), |
| 182 | + ), |
| 183 | + ("name", models.TextField()), |
| 184 | + ("version", models.TextField()), |
| 185 | + ("metadata_version", models.TextField()), |
| 186 | + ("summary", models.TextField()), |
| 187 | + ("description", models.TextField()), |
| 188 | + ("keywords", models.TextField()), |
| 189 | + ("home_page", models.TextField()), |
| 190 | + ("download_url", models.TextField()), |
| 191 | + ("author", models.TextField()), |
| 192 | + ("author_email", models.TextField()), |
| 193 | + ("maintainer", models.TextField()), |
| 194 | + ("maintainer_email", models.TextField()), |
| 195 | + ("license", models.TextField()), |
| 196 | + ("requires_python", models.TextField()), |
| 197 | + ("project_url", models.TextField()), |
| 198 | + ("platform", models.TextField()), |
| 199 | + ("supported_platform", models.TextField()), |
| 200 | + ("requires_dist", django.contrib.postgres.fields.jsonb.JSONField(default=list)), |
| 201 | + ("provides_dist", django.contrib.postgres.fields.jsonb.JSONField(default=list)), |
| 202 | + ("obsoletes_dist", django.contrib.postgres.fields.jsonb.JSONField(default=list)), |
| 203 | + ("requires_external", django.contrib.postgres.fields.jsonb.JSONField(default=list)), |
| 204 | + ("classifiers", django.contrib.postgres.fields.jsonb.JSONField(default=list)), |
| 205 | + ("python_version", models.TextField()), |
| 206 | + ("sha256", models.CharField(db_index=True, max_length=64, unique=True)), |
| 207 | + ("description_content_type", models.TextField()), |
| 208 | + ("project_urls", django.contrib.postgres.fields.jsonb.JSONField(default=dict)), |
| 209 | + ], |
| 210 | + options={ |
| 211 | + "default_related_name": "%(app_label)s_%(model_name)s", |
| 212 | + "unique_together": {("filename",)}, |
| 213 | + }, |
| 214 | + bases=("core.content",), |
| 215 | + ), |
| 216 | + migrations.SeparateDatabaseAndState( |
| 217 | + state_operations=[ |
| 218 | + migrations.AlterUniqueTogether( |
| 219 | + name="pythonpackagecontent", |
| 220 | + unique_together={("sha256",)}, |
| 221 | + ), |
| 222 | + ], |
| 223 | + ), |
| 224 | + migrations.AddField( |
| 225 | + model_name="pythondistribution", |
| 226 | + name="allow_uploads", |
| 227 | + field=models.BooleanField(default=True), |
| 228 | + ), |
| 229 | + migrations.AlterField( |
| 230 | + model_name="pythonpackagecontent", |
| 231 | + name="classifiers", |
| 232 | + field=models.JSONField(default=list), |
| 233 | + ), |
| 234 | + migrations.AlterField( |
| 235 | + model_name="pythonpackagecontent", |
| 236 | + name="obsoletes_dist", |
| 237 | + field=models.JSONField(default=list), |
| 238 | + ), |
| 239 | + migrations.AlterField( |
| 240 | + model_name="pythonpackagecontent", |
| 241 | + name="project_urls", |
| 242 | + field=models.JSONField(default=dict), |
| 243 | + ), |
| 244 | + migrations.AlterField( |
| 245 | + model_name="pythonpackagecontent", |
| 246 | + name="provides_dist", |
| 247 | + field=models.JSONField(default=list), |
| 248 | + ), |
| 249 | + migrations.AlterField( |
| 250 | + model_name="pythonpackagecontent", |
| 251 | + name="requires_dist", |
| 252 | + field=models.JSONField(default=list), |
| 253 | + ), |
| 254 | + migrations.AlterField( |
| 255 | + model_name="pythonpackagecontent", |
| 256 | + name="requires_external", |
| 257 | + field=models.JSONField(default=list), |
| 258 | + ), |
| 259 | + migrations.AlterField( |
| 260 | + model_name="pythonremote", |
| 261 | + name="excludes", |
| 262 | + field=models.JSONField(default=list), |
| 263 | + ), |
| 264 | + migrations.AlterField( |
| 265 | + model_name="pythonremote", |
| 266 | + name="includes", |
| 267 | + field=models.JSONField(default=list), |
| 268 | + ), |
| 269 | + ] |
0 commit comments