Skip to content

Commit

Permalink
🚚 Migrate to lamindb 1.0 (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
falexwolf authored Jan 11, 2025
1 parent 365bc6c commit 585f0dd
Show file tree
Hide file tree
Showing 4 changed files with 386 additions and 21 deletions.
211 changes: 211 additions & 0 deletions bionty/migrations/0042_lamindbv1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
# Generated by Django 5.2 on 2025-01-07 14:37

import django.db.models.deletion
import lamindb.base.fields
from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("bionty", "0041_squashed"),
("lamindb", "0071_lamindbv1_migrate_schema"),
]

operations = [
migrations.AddField(
model_name="cellline",
name="_branch_code",
field=models.SmallIntegerField(db_index=True, default=1, db_default=1),
),
migrations.AddField(
model_name="cellmarker",
name="_branch_code",
field=models.SmallIntegerField(db_index=True, default=1, db_default=1),
),
migrations.AddField(
model_name="celltype",
name="_branch_code",
field=models.SmallIntegerField(db_index=True, default=1, db_default=1),
),
migrations.AddField(
model_name="developmentalstage",
name="_branch_code",
field=models.SmallIntegerField(db_index=True, default=1, db_default=1),
),
migrations.AddField(
model_name="disease",
name="_branch_code",
field=models.SmallIntegerField(db_index=True, default=1, db_default=1),
),
migrations.AddField(
model_name="ethnicity",
name="_branch_code",
field=models.SmallIntegerField(db_index=True, default=1, db_default=1),
),
migrations.AddField(
model_name="experimentalfactor",
name="_branch_code",
field=models.SmallIntegerField(db_index=True, default=1, db_default=1),
),
migrations.AddField(
model_name="gene",
name="_branch_code",
field=models.SmallIntegerField(db_index=True, default=1, db_default=1),
),
migrations.AddField(
model_name="organism",
name="_branch_code",
field=models.SmallIntegerField(db_index=True, default=1, db_default=1),
),
migrations.AddField(
model_name="pathway",
name="_branch_code",
field=models.SmallIntegerField(db_index=True, default=1, db_default=1),
),
migrations.AddField(
model_name="phenotype",
name="_branch_code",
field=models.SmallIntegerField(db_index=True, default=1, db_default=1),
),
migrations.AddField(
model_name="protein",
name="_branch_code",
field=models.SmallIntegerField(db_index=True, default=1, db_default=1),
),
migrations.AddField(
model_name="source",
name="_branch_code",
field=models.SmallIntegerField(db_index=True, default=1, db_default=1),
),
migrations.AddField(
model_name="tissue",
name="_branch_code",
field=models.SmallIntegerField(db_index=True, default=1, db_default=1),
),
migrations.AddField(
model_name="cellline",
name="aux",
field=models.JSONField(default=None, db_default=None, null=True),
),
migrations.AddField(
model_name="cellmarker",
name="aux",
field=models.JSONField(default=None, db_default=None, null=True),
),
migrations.AddField(
model_name="celltype",
name="aux",
field=models.JSONField(default=None, db_default=None, null=True),
),
migrations.AddField(
model_name="developmentalstage",
name="aux",
field=models.JSONField(default=None, db_default=None, null=True),
),
migrations.AddField(
model_name="disease",
name="aux",
field=models.JSONField(default=None, db_default=None, null=True),
),
migrations.AddField(
model_name="ethnicity",
name="aux",
field=models.JSONField(default=None, db_default=None, null=True),
),
migrations.AddField(
model_name="experimentalfactor",
name="aux",
field=models.JSONField(default=None, db_default=None, null=True),
),
migrations.AddField(
model_name="gene",
name="aux",
field=models.JSONField(default=None, db_default=None, null=True),
),
migrations.AddField(
model_name="organism",
name="aux",
field=models.JSONField(default=None, db_default=None, null=True),
),
migrations.AddField(
model_name="pathway",
name="aux",
field=models.JSONField(default=None, db_default=None, null=True),
),
migrations.AddField(
model_name="phenotype",
name="aux",
field=models.JSONField(default=None, db_default=None, null=True),
),
migrations.AddField(
model_name="protein",
name="aux",
field=models.JSONField(default=None, db_default=None, null=True),
),
migrations.AddField(
model_name="source",
name="aux",
field=models.JSONField(default=None, db_default=None, null=True),
),
migrations.AddField(
model_name="tissue",
name="aux",
field=models.JSONField(default=None, db_default=None, null=True),
),
migrations.RemoveField(
model_name="cellline",
name="_previous_runs",
),
migrations.RemoveField(
model_name="cellmarker",
name="_previous_runs",
),
migrations.RemoveField(
model_name="celltype",
name="_previous_runs",
),
migrations.RemoveField(
model_name="developmentalstage",
name="_previous_runs",
),
migrations.RemoveField(
model_name="disease",
name="_previous_runs",
),
migrations.RemoveField(
model_name="ethnicity",
name="_previous_runs",
),
migrations.RemoveField(
model_name="experimentalfactor",
name="_previous_runs",
),
migrations.RemoveField(
model_name="gene",
name="_previous_runs",
),
migrations.RemoveField(
model_name="organism",
name="_previous_runs",
),
migrations.RemoveField(
model_name="pathway",
name="_previous_runs",
),
migrations.RemoveField(
model_name="phenotype",
name="_previous_runs",
),
migrations.RemoveField(
model_name="protein",
name="_previous_runs",
),
migrations.RemoveField(
model_name="source",
name="_previous_runs",
),
migrations.RemoveField(
model_name="tissue",
name="_previous_runs",
),
]
154 changes: 154 additions & 0 deletions bionty/migrations/0043_lamindbv2_part2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# Generated by Django 5.2 on 2025-01-10 23:59

import django.db.models.deletion
import lamindb.base.fields
from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("bionty", "0042_lamindbv1"),
]

operations = [
migrations.AddField(
model_name="cellline",
name="space",
field=lamindb.base.fields.ForeignKey(
blank=True,
default=1,
on_delete=django.db.models.deletion.PROTECT,
to="lamindb.space",
),
),
migrations.AddField(
model_name="cellmarker",
name="space",
field=lamindb.base.fields.ForeignKey(
blank=True,
default=1,
on_delete=django.db.models.deletion.PROTECT,
to="lamindb.space",
),
),
migrations.AddField(
model_name="celltype",
name="space",
field=lamindb.base.fields.ForeignKey(
blank=True,
default=1,
on_delete=django.db.models.deletion.PROTECT,
to="lamindb.space",
),
),
migrations.AddField(
model_name="developmentalstage",
name="space",
field=lamindb.base.fields.ForeignKey(
blank=True,
default=1,
on_delete=django.db.models.deletion.PROTECT,
to="lamindb.space",
),
),
migrations.AddField(
model_name="disease",
name="space",
field=lamindb.base.fields.ForeignKey(
blank=True,
default=1,
on_delete=django.db.models.deletion.PROTECT,
to="lamindb.space",
),
),
migrations.AddField(
model_name="ethnicity",
name="space",
field=lamindb.base.fields.ForeignKey(
blank=True,
default=1,
on_delete=django.db.models.deletion.PROTECT,
to="lamindb.space",
),
),
migrations.AddField(
model_name="experimentalfactor",
name="space",
field=lamindb.base.fields.ForeignKey(
blank=True,
default=1,
on_delete=django.db.models.deletion.PROTECT,
to="lamindb.space",
),
),
migrations.AddField(
model_name="gene",
name="space",
field=lamindb.base.fields.ForeignKey(
blank=True,
default=1,
on_delete=django.db.models.deletion.PROTECT,
to="lamindb.space",
),
),
migrations.AddField(
model_name="organism",
name="space",
field=lamindb.base.fields.ForeignKey(
blank=True,
default=1,
on_delete=django.db.models.deletion.PROTECT,
to="lamindb.space",
),
),
migrations.AddField(
model_name="pathway",
name="space",
field=lamindb.base.fields.ForeignKey(
blank=True,
default=1,
on_delete=django.db.models.deletion.PROTECT,
to="lamindb.space",
),
),
migrations.AddField(
model_name="phenotype",
name="space",
field=lamindb.base.fields.ForeignKey(
blank=True,
default=1,
on_delete=django.db.models.deletion.PROTECT,
to="lamindb.space",
),
),
migrations.AddField(
model_name="protein",
name="space",
field=lamindb.base.fields.ForeignKey(
blank=True,
default=1,
on_delete=django.db.models.deletion.PROTECT,
to="lamindb.space",
),
),
migrations.AddField(
model_name="source",
name="space",
field=lamindb.base.fields.ForeignKey(
blank=True,
default=1,
on_delete=django.db.models.deletion.PROTECT,
to="lamindb.space",
),
),
migrations.AddField(
model_name="tissue",
name="space",
field=lamindb.base.fields.ForeignKey(
blank=True,
default=1,
on_delete=django.db.models.deletion.PROTECT,
to="lamindb.space",
),
),
]
Loading

0 comments on commit 585f0dd

Please sign in to comment.