REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.04 KB
Close
/opt/cloudlinux/venv/lib/python3.11/site-packages/pylint_django/tests/input/migrations/0002_new_column.py
Text
Base64
""" Migration file which adds a new column with a default value. This should trigger a warning because adding new columns with default value on a large table leads to DB performance issues. See: https://github.com/PyCQA/pylint-django/issues/118 and https://docs.djangoproject.com/en/2.0/topics/migrations/#postgresql > ... adding columns with default values will cause a full rewrite of > the table, for a time proportional to its size. > For this reason, it’s recommended you always create new columns with > null=True, as this way they will be added immediately. """ # pylint: disable=missing-docstring, invalid-name from datetime import timedelta from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("input", "0001_noerror_initial"), ] operations = [ # add a timedelta field migrations.AddField( # [new-db-field-with-default] model_name="testrun", name="estimated_time", field=models.DurationField(default=timedelta(0)), ), ]
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
__pycache__
DIR
-
drwxr-xr-x
2026-02-06 08:01:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
0001_noerror_initial.py
608 B
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
0002_new_column.py
1.04 KB
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
0002_new_column.txt
137 B
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
0003_without_backwards.py
575 B
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
0003_without_backwards.txt
448 B
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
0004_noerror_with_backwards.py
467 B
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
0 B
lrw-r--r--
2026-01-20 13:01:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).