Skip to content

Commit

Permalink
🎨 Re-create 1st migration (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnyosun authored Nov 21, 2024
1 parent 98606b8 commit 3ce7d1e
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 183 deletions.
91 changes: 71 additions & 20 deletions ourprojects/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated by Django 5.1.1 on 2024-10-18 23:40
# Generated by Django 5.2 on 2024-11-21 10:57

import django.db.models.deletion
import lnschema_core.fields
import lnschema_core.ids
import lnschema_core.models
import lnschema_core.users
Expand All @@ -11,28 +12,46 @@ class Migration(migrations.Migration):
initial = True

dependencies = [
("lnschema_core", "0068_alter_artifactulabel_unique_together_and_more"),
("lnschema_core", "0069_squashed"),
]

operations = [
migrations.CreateModel(
name="ArtifactProject",
fields=[
("created_at", models.DateTimeField(auto_now_add=True, db_index=True)),
(
"created_at",
lnschema_core.fields.DateTimeField(
auto_now_add=True, db_index=True
),
),
("id", models.BigAutoField(primary_key=True, serialize=False)),
("label_ref_is_name", models.BooleanField(default=None, null=True)),
("feature_ref_is_name", models.BooleanField(default=None, null=True)),
(
"label_ref_is_name",
lnschema_core.fields.BooleanField(
blank=True, default=None, null=True
),
),
(
"feature_ref_is_name",
lnschema_core.fields.BooleanField(
blank=True, default=None, null=True
),
),
(
"artifact",
models.ForeignKey(
lnschema_core.fields.ForeignKey(
blank=True,
default=None,
on_delete=django.db.models.deletion.CASCADE,
related_name="links_project",
to="lnschema_core.artifact",
),
),
(
"created_by",
models.ForeignKey(
lnschema_core.fields.ForeignKey(
blank=True,
default=lnschema_core.users.current_user_id,
on_delete=django.db.models.deletion.PROTECT,
related_name="+",
Expand All @@ -41,7 +60,8 @@ class Migration(migrations.Migration):
),
(
"feature",
models.ForeignKey(
lnschema_core.fields.ForeignKey(
blank=True,
default=None,
null=True,
on_delete=django.db.models.deletion.PROTECT,
Expand All @@ -51,7 +71,8 @@ class Migration(migrations.Migration):
),
(
"run",
models.ForeignKey(
lnschema_core.fields.ForeignKey(
blank=True,
default=lnschema_core.models.current_run,
null=True,
on_delete=django.db.models.deletion.PROTECT,
Expand All @@ -65,27 +86,49 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name="Project",
fields=[
("created_at", models.DateTimeField(auto_now_add=True, db_index=True)),
("updated_at", models.DateTimeField(auto_now=True, db_index=True)),
(
"created_at",
lnschema_core.fields.DateTimeField(
auto_now_add=True, db_index=True
),
),
(
"updated_at",
lnschema_core.fields.DateTimeField(auto_now=True, db_index=True),
),
("id", models.AutoField(primary_key=True, serialize=False)),
(
"uid",
models.CharField(
default=lnschema_core.ids.base62_12, max_length=12, unique=True
lnschema_core.fields.CharField(
blank=True,
default=lnschema_core.ids.base62_12,
max_length=12,
unique=True,
),
),
(
"name",
lnschema_core.fields.CharField(
blank=True, db_index=True, default=None, max_length=255
),
),
("name", models.CharField(db_index=True, default=None, max_length=255)),
(
"abbr",
models.CharField(
lnschema_core.fields.CharField(
blank=True,
db_index=True,
default=None,
max_length=32,
null=True,
unique=True,
),
),
("url", models.URLField(default=None, max_length=255, null=True)),
(
"url",
lnschema_core.fields.URLField(
blank=True, default=None, max_length=255, null=True
),
),
(
"_previous_runs",
models.ManyToManyField(related_name="+", to="lnschema_core.run"),
Expand All @@ -100,7 +143,8 @@ class Migration(migrations.Migration):
),
(
"created_by",
models.ForeignKey(
lnschema_core.fields.ForeignKey(
blank=True,
default=lnschema_core.users.current_user_id,
on_delete=django.db.models.deletion.PROTECT,
related_name="+",
Expand All @@ -109,7 +153,8 @@ class Migration(migrations.Migration):
),
(
"run",
models.ForeignKey(
lnschema_core.fields.ForeignKey(
blank=True,
default=lnschema_core.models.current_run,
null=True,
on_delete=django.db.models.deletion.PROTECT,
Expand All @@ -121,12 +166,18 @@ class Migration(migrations.Migration):
options={
"abstract": False,
},
bases=(lnschema_core.models.CanCurate, models.Model),
bases=(
lnschema_core.models.CanCurate,
models.Model,
lnschema_core.models.ValidateFields,
),
),
migrations.AddField(
model_name="artifactproject",
name="project",
field=models.ForeignKey(
field=lnschema_core.fields.ForeignKey(
blank=True,
default=None,
on_delete=django.db.models.deletion.PROTECT,
related_name="links_artifact",
to="ourprojects.project",
Expand Down
163 changes: 0 additions & 163 deletions ourprojects/migrations/0002_alter_artifactproject_artifact_and_more.py

This file was deleted.

0 comments on commit 3ce7d1e

Please sign in to comment.