Skip to content

Commit

Permalink
squash migrations (#1446)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed Jul 16, 2024
1 parent 97b2c86 commit cff898b
Show file tree
Hide file tree
Showing 7 changed files with 2,212 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Changed
- Add ``AUTH_LDAP_USER_SEARCH_BASE`` as a Django setting (#1410)
- Change ``ATOMIC_REQUESTS`` recommendation and default to ``True`` (#1281)
- Add OpenAPI dependencies (#1444)
- Squash migrations (#1446)
- **Filesfolders**
- Add migration required by Django v4.2 (#1396)
- Add app specific media type and versioning (#1278)
Expand Down
113 changes: 113 additions & 0 deletions adminalerts/migrations/0001_squashed_0006_adminalert_require_auth.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Generated by Django 4.2.14 on 2024-07-16 09:17

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import markupfield.fields
import uuid


class Migration(migrations.Migration):

replaces = [
('adminalerts', '0001_initial'),
('adminalerts', '0002_adminalert_user'),
('adminalerts', '0003_auto_20180802_1558'),
('adminalerts', '0004_rename_uuid'),
('adminalerts', '0005_update_uuid'),
('adminalerts', '0006_adminalert_require_auth'),
]

initial = True

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

operations = [
migrations.CreateModel(
name='AdminAlert',
fields=[
(
'id',
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name='ID',
),
),
(
'message',
models.CharField(
help_text='Alert message to be shown for users', max_length=255
),
),
(
'description',
markupfield.fields.MarkupField(
blank=True,
help_text='Full description of alert (optional, will be shown on a separate page)',
null=True,
rendered_field=True,
),
),
(
'date_created',
models.DateTimeField(
auto_now_add=True, help_text='Alert creation timestamp'
),
),
(
'date_expire',
models.DateTimeField(help_text='Alert expiration timestamp'),
),
(
'active',
models.BooleanField(
default=True,
help_text='Alert status (for disabling the alert before expiration)',
),
),
(
'sodar_uuid',
models.UUIDField(
default=uuid.uuid4,
help_text='Adminalerts SODAR UUID',
unique=True,
),
),
(
'user',
models.ForeignKey(
help_text='Superuser who has set the alert',
on_delete=django.db.models.deletion.CASCADE,
related_name='alerts',
to=settings.AUTH_USER_MODEL,
),
),
('_description_rendered', models.TextField(editable=False, null=True)),
(
'description_markup_type',
models.CharField(
choices=[
('', '--'),
('html', 'HTML'),
('plain', 'Plain'),
('markdown', 'Markdown'),
('restructuredtext', 'Restructured Text'),
],
default='markdown',
editable=False,
max_length=30,
),
),
(
'require_auth',
models.BooleanField(
default=True, help_text='Require authorization to view alert'
),
),
],
),
]
148 changes: 148 additions & 0 deletions bgjobs/migrations/0001_squashed_0006_auto_20200526_1657.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# Generated by Django 4.2.14 on 2024-07-16 09:22

from django.conf import settings
from django.db import migrations, models
import django.utils.timezone
import uuid


class Migration(migrations.Migration):

replaces = [
('bgjobs', '0001_initial'),
('bgjobs', '0002_backgroundjoblogentry'),
('bgjobs', '0003_backgroundjob_date_created'),
('bgjobs', '0004_backgroundjob_user'),
('bgjobs', '0005_auto_20190128_1210'),
('bgjobs', '0006_auto_20200526_1657'),
]

initial = True

dependencies = [
('projectroles', '0005_update_uuid'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

operations = [
migrations.CreateModel(
name='BackgroundJob',
fields=[
(
'id',
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name='ID',
),
),
(
'date_modified',
models.DateTimeField(
auto_now=True, help_text='DateTime of last modification'
),
),
(
'sodar_uuid',
models.UUIDField(
default=uuid.uuid4, help_text='BG Job SODAR UUID', unique=True
),
),
(
'job_type',
models.CharField(help_text='Type of the job', max_length=512),
),
('name', models.CharField(max_length=512)),
('description', models.TextField()),
(
'status',
models.CharField(
choices=[
('initial', 'initial'),
('running', 'running'),
('done', 'done'),
('failed', 'failed'),
],
default='initial',
max_length=50,
),
),
(
'project',
models.ForeignKey(
help_text='Project in which this objects belongs',
null=True,
on_delete=django.db.models.deletion.CASCADE,
to='projectroles.project',
),
),
(
'date_created',
models.DateTimeField(
auto_now_add=True,
default=django.utils.timezone.now,
help_text='DateTime of creation',
),
),
(
'user',
models.ForeignKey(
default=1,
on_delete=django.db.models.deletion.CASCADE,
related_name='background_jobs',
to=settings.AUTH_USER_MODEL,
),
),
],
options={
'ordering': ['-date_created'],
},
),
migrations.CreateModel(
name='BackgroundJobLogEntry',
fields=[
(
'id',
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name='ID',
),
),
(
'date_created',
models.DateTimeField(
auto_now_add=True, help_text='DateTime of creation'
),
),
(
'level',
models.CharField(
choices=[
('debug', 'debug'),
('info', 'info'),
('warning', 'warning'),
('error', 'error'),
],
help_text='Level of log entry',
max_length=50,
),
),
('message', models.TextField(help_text='Log level\'s message')),
(
'job',
models.ForeignKey(
help_text='Owning background job',
on_delete=django.db.models.deletion.CASCADE,
related_name='log_entries',
to='bgjobs.backgroundjob',
),
),
],
options={
'ordering': ['date_created'],
},
),
]
Loading

0 comments on commit cff898b

Please sign in to comment.