Skip to content

Commit

Permalink
Merge pull request #243 from gitnnolabs/add_concepts
Browse files Browse the repository at this point in the history
Adiciona o modelo de ``concepts`` do OpenALex.
  • Loading branch information
gitnnolabs authored Oct 30, 2023
2 parents fc795d8 + f156fc5 commit 75220a8
Show file tree
Hide file tree
Showing 14 changed files with 65,861 additions and 68 deletions.
96 changes: 96 additions & 0 deletions article/migrations/0019_sourceconcepts_and_more.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Generated by Django 4.1.6 on 2023-10-30 06:32

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
("core", "0002_language"),
("article", "0018_alter_affiliation_name"),
]

operations = [
migrations.CreateModel(
name="SourceConcepts",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"specific_id",
models.CharField(max_length=255, verbose_name="Specific Id"),
),
(
"name",
models.CharField(
blank=True,
help_text="Name of the concept",
max_length=255,
null=True,
verbose_name="Nome",
),
),
(
"normalized_name",
models.CharField(
blank=True,
help_text="Name of the concept",
max_length=255,
null=True,
verbose_name="Normalized Name",
),
),
(
"level",
models.IntegerField(
blank=True,
help_text="Number indicating hierarchy",
null=True,
verbose_name="Nível",
),
),
(
"parent_display_names",
models.CharField(
blank=True,
help_text="The name of parents up to child names",
max_length=255,
null=True,
verbose_name="Parent Display Name",
),
),
],
),
migrations.RemoveIndex(
model_name="affiliation",
name="article_aff_name_d033b1_idx",
),
migrations.AddField(
model_name="sourceconcepts",
name="parent_ids",
field=models.ManyToManyField(
blank=True,
related_name="parent_id",
to="article.sourceconcepts",
verbose_name="Parent ids",
),
),
migrations.AddField(
model_name="sourceconcepts",
name="source",
field=models.ForeignKey(
null=True,
on_delete=django.db.models.deletion.CASCADE,
to="core.source",
verbose_name="Origem",
),
),
]
18 changes: 18 additions & 0 deletions article/migrations/0020_alter_sourceconcepts_specific_id.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.1.6 on 2023-10-30 07:33

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("article", "0019_sourceconcepts_and_more"),
]

operations = [
migrations.AlterField(
model_name="sourceconcepts",
name="specific_id",
field=models.CharField(max_length=512, verbose_name="Specific Id"),
),
]
40 changes: 40 additions & 0 deletions article/migrations/0021_alter_sourceconcepts_name_and_more.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Generated by Django 4.1.6 on 2023-10-30 07:56

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("article", "0020_alter_sourceconcepts_specific_id"),
]

operations = [
migrations.AlterField(
model_name="sourceconcepts",
name="name",
field=models.CharField(
blank=True,
help_text="Name of the concept",
max_length=512,
null=True,
verbose_name="Nome",
),
),
migrations.AlterField(
model_name="sourceconcepts",
name="normalized_name",
field=models.CharField(
blank=True,
help_text="Name of the concept",
max_length=512,
null=True,
verbose_name="Normalized Name",
),
),
migrations.AlterField(
model_name="sourceconcepts",
name="specific_id",
field=models.CharField(max_length=255, verbose_name="Specific Id"),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 4.1.6 on 2023-10-30 08:08

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("article", "0021_alter_sourceconcepts_name_and_more"),
]

operations = [
migrations.AlterField(
model_name="sourceconcepts",
name="parent_display_names",
field=models.CharField(
blank=True,
help_text="The name of parents up to child names",
max_length=512,
null=True,
verbose_name="Parent Display Name",
),
),
]
35 changes: 35 additions & 0 deletions article/migrations/0023_sourceconcepts_thematic_areas_and_more.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Generated by Django 4.1.6 on 2023-10-30 08:54

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("usefulmodels", "0012_alter_action_creator_alter_action_updated_by_and_more"),
("article", "0022_alter_sourceconcepts_parent_display_names"),
]

operations = [
migrations.AddField(
model_name="sourceconcepts",
name="thematic_areas",
field=models.ManyToManyField(
blank=True,
help_text="Thematic area relation",
to="usefulmodels.thematicarea",
verbose_name="Área temática",
),
),
migrations.AlterField(
model_name="sourceconcepts",
name="parent_ids",
field=models.ManyToManyField(
blank=True,
help_text="Parent relation",
related_name="parent_id",
to="article.sourceconcepts",
verbose_name="Parent ids",
),
),
]
23 changes: 23 additions & 0 deletions article/migrations/0024_rename_sourceconcepts_concepts_and_more.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.1.6 on 2023-10-30 14:49

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("core", "0002_language"),
("usefulmodels", "0012_alter_action_creator_alter_action_updated_by_and_more"),
("article", "0023_sourceconcepts_thematic_areas_and_more"),
]

operations = [
migrations.RenameModel(
old_name="SourceConcepts",
new_name="Concepts",
),
migrations.AlterModelOptions(
name="concepts",
options={"verbose_name": "Concept", "verbose_name_plural": "Concepts"},
),
]
25 changes: 25 additions & 0 deletions article/migrations/0025_alter_concepts_source.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated by Django 4.1.6 on 2023-10-30 15:03

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
("core", "0002_language"),
("article", "0024_rename_sourceconcepts_concepts_and_more"),
]

operations = [
migrations.AlterField(
model_name="concepts",
name="source",
field=models.ForeignKey(
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="core.source",
verbose_name="Origem",
),
),
]
27 changes: 27 additions & 0 deletions article/migrations/0026_article_concepts_article_programs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Generated by Django 4.1.6 on 2023-10-30 15:06

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("article", "0025_alter_concepts_source"),
]

operations = [
migrations.AddField(
model_name="article",
name="concepts",
field=models.ManyToManyField(
blank=True, to="article.concepts", verbose_name="Concepts"
),
),
migrations.AddField(
model_name="article",
name="programs",
field=models.ManyToManyField(
blank=True, to="article.program", verbose_name="Programs"
),
),
]
Loading

0 comments on commit 75220a8

Please sign in to comment.