Skip to content

Commit

Permalink
Make initial migration for EBIOS RM app
Browse files Browse the repository at this point in the history
  • Loading branch information
nas-tabchiche committed Dec 2, 2024
1 parent ac15c3a commit 12839a9
Show file tree
Hide file tree
Showing 4 changed files with 735 additions and 26 deletions.
1 change: 1 addition & 0 deletions backend/ciso_assistant/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def set_ciso_assistant_url(_, __, event_dict):
"global_settings",
"tprm",
"core",
"ebios_rm",
"cal",
"django_filters",
"library",
Expand Down
134 changes: 110 additions & 24 deletions backend/core/migrations/0044_qualification.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,124 @@


class Migration(migrations.Migration):

dependencies = [
('core', '0043_historicalmetric'),
('iam', '0009_create_allauth_emailaddress_objects'),
("core", "0043_historicalmetric"),
("iam", "0009_create_allauth_emailaddress_objects"),
]

operations = [
migrations.CreateModel(
name='Qualification',
name="Qualification",
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created at')),
('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated at')),
('is_published', models.BooleanField(default=False, verbose_name='published')),
('urn', models.CharField(blank=True, max_length=255, null=True, unique=True, verbose_name='URN')),
('ref_id', models.CharField(blank=True, max_length=100, null=True, verbose_name='Reference ID')),
('provider', models.CharField(blank=True, max_length=200, null=True, verbose_name='Provider')),
('name', models.CharField(max_length=200, null=True, verbose_name='Name')),
('description', models.TextField(blank=True, null=True, verbose_name='Description')),
('annotation', models.TextField(blank=True, null=True, verbose_name='Annotation')),
('translations', models.JSONField(blank=True, null=True, verbose_name='Translations')),
('locale', models.CharField(default='en', max_length=100, verbose_name='Locale')),
('default_locale', models.BooleanField(default=True, verbose_name='Default locale')),
('abbreviation', models.CharField(blank=True, max_length=20, null=True, verbose_name='Abbreviation')),
('qualification_ordering', models.PositiveSmallIntegerField(default=0, verbose_name='Ordering')),
('security_objective_ordering', models.PositiveSmallIntegerField(default=0, verbose_name='Security objective ordering')),
('folder', models.ForeignKey(default=iam.models.Folder.get_root_folder_id, on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_folder', to='iam.folder')),
(
"id",
models.UUIDField(
default=uuid.uuid4,
editable=False,
primary_key=True,
serialize=False,
),
),
(
"created_at",
models.DateTimeField(auto_now_add=True, verbose_name="Created at"),
),
(
"updated_at",
models.DateTimeField(auto_now=True, verbose_name="Updated at"),
),
(
"is_published",
models.BooleanField(default=False, verbose_name="published"),
),
(
"urn",
models.CharField(
blank=True,
max_length=255,
null=True,
unique=True,
verbose_name="URN",
),
),
(
"ref_id",
models.CharField(
blank=True,
max_length=100,
null=True,
verbose_name="Reference ID",
),
),
(
"provider",
models.CharField(
blank=True, max_length=200, null=True, verbose_name="Provider"
),
),
(
"name",
models.CharField(max_length=200, null=True, verbose_name="Name"),
),
(
"description",
models.TextField(blank=True, null=True, verbose_name="Description"),
),
(
"annotation",
models.TextField(blank=True, null=True, verbose_name="Annotation"),
),
(
"translations",
models.JSONField(
blank=True, null=True, verbose_name="Translations"
),
),
(
"locale",
models.CharField(
default="en", max_length=100, verbose_name="Locale"
),
),
(
"default_locale",
models.BooleanField(default=True, verbose_name="Default locale"),
),
(
"abbreviation",
models.CharField(
blank=True,
max_length=20,
null=True,
verbose_name="Abbreviation",
),
),
(
"qualification_ordering",
models.PositiveSmallIntegerField(
default=0, verbose_name="Ordering"
),
),
(
"security_objective_ordering",
models.PositiveSmallIntegerField(
default=0, verbose_name="Security objective ordering"
),
),
(
"folder",
models.ForeignKey(
default=iam.models.Folder.get_root_folder_id,
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s_folder",
to="iam.folder",
),
),
],
options={
'verbose_name': 'Qualification',
'verbose_name_plural': 'Qualifications',
'ordering': ['qualification_ordering'],
"verbose_name": "Qualification",
"verbose_name_plural": "Qualifications",
"ordering": ["qualification_ordering"],
},
),
]
4 changes: 2 additions & 2 deletions backend/ebios_rm/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@


class EbiosRmConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'ebios_rm'
default_auto_field = "django.db.models.BigAutoField"
name = "ebios_rm"
Loading

0 comments on commit 12839a9

Please sign in to comment.