lamindb 1.6.2__py3-none-any.whl → 1.7.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lamindb/__init__.py +1 -3
- lamindb/_finish.py +32 -16
- lamindb/base/types.py +6 -4
- lamindb/core/_context.py +127 -57
- lamindb/core/_mapped_collection.py +1 -1
- lamindb/core/_settings.py +44 -4
- lamindb/core/_track_environment.py +5 -2
- lamindb/core/loaders.py +1 -1
- lamindb/core/storage/_anndata_accessor.py +1 -1
- lamindb/core/storage/_tiledbsoma.py +14 -8
- lamindb/core/storage/_valid_suffixes.py +0 -1
- lamindb/core/storage/_zarr.py +1 -1
- lamindb/core/storage/objects.py +13 -8
- lamindb/core/storage/paths.py +9 -6
- lamindb/core/types.py +1 -1
- lamindb/curators/_legacy.py +2 -1
- lamindb/curators/core.py +106 -105
- lamindb/errors.py +9 -0
- lamindb/examples/fixtures/__init__.py +0 -0
- lamindb/examples/fixtures/sheets.py +224 -0
- lamindb/migrations/0103_remove_writelog_migration_state_and_more.py +1 -1
- lamindb/migrations/0105_record_unique_name.py +20 -0
- lamindb/migrations/0106_transfer_data_migration.py +25 -0
- lamindb/migrations/0107_add_schema_to_record.py +68 -0
- lamindb/migrations/0108_remove_record_sheet_remove_sheetproject_sheet_and_more.py +30 -0
- lamindb/migrations/0109_record_input_of_runs_alter_record_run_and_more.py +123 -0
- lamindb/migrations/0110_rename_values_artifacts_record_linked_artifacts.py +17 -0
- lamindb/migrations/0111_remove_record__sort_order.py +148 -0
- lamindb/migrations/0112_alter_recordartifact_feature_and_more.py +105 -0
- lamindb/migrations/0113_lower_case_branch_and_space_names.py +62 -0
- lamindb/migrations/0114_alter_run__status_code.py +24 -0
- lamindb/migrations/0115_alter_space_uid.py +52 -0
- lamindb/migrations/{0104_squashed.py → 0115_squashed.py} +261 -257
- lamindb/models/__init__.py +4 -3
- lamindb/models/_describe.py +88 -31
- lamindb/models/_feature_manager.py +627 -658
- lamindb/models/_label_manager.py +1 -3
- lamindb/models/artifact.py +214 -99
- lamindb/models/collection.py +7 -1
- lamindb/models/feature.py +288 -60
- lamindb/models/has_parents.py +3 -3
- lamindb/models/project.py +32 -15
- lamindb/models/query_manager.py +7 -1
- lamindb/models/query_set.py +118 -41
- lamindb/models/record.py +140 -94
- lamindb/models/run.py +42 -42
- lamindb/models/save.py +102 -16
- lamindb/models/schema.py +41 -8
- lamindb/models/sqlrecord.py +105 -40
- lamindb/models/storage.py +278 -0
- lamindb/models/transform.py +10 -2
- lamindb/models/ulabel.py +9 -1
- lamindb/py.typed +0 -0
- lamindb/setup/__init__.py +2 -1
- lamindb/setup/_switch.py +16 -0
- lamindb/setup/errors/__init__.py +4 -0
- lamindb/setup/types/__init__.py +4 -0
- {lamindb-1.6.2.dist-info → lamindb-1.7.0.dist-info}/METADATA +5 -5
- {lamindb-1.6.2.dist-info → lamindb-1.7.0.dist-info}/RECORD +61 -44
- lamindb/models/core.py +0 -135
- {lamindb-1.6.2.dist-info → lamindb-1.7.0.dist-info}/LICENSE +0 -0
- {lamindb-1.6.2.dist-info → lamindb-1.7.0.dist-info}/WHEEL +0 -0
@@ -1,8 +1,9 @@
|
|
1
|
-
# Generated by Django 5.2 on 2025-06
|
1
|
+
# Generated by Django 5.2 on 2025-07-06 09:12
|
2
2
|
|
3
3
|
import django.core.validators
|
4
4
|
import django.db.models.deletion
|
5
5
|
import django.db.models.functions.datetime
|
6
|
+
import django.db.models.functions.text
|
6
7
|
from django.db import migrations, models
|
7
8
|
|
8
9
|
import lamindb.base.fields
|
@@ -125,6 +126,17 @@ class Migration(migrations.Migration):
|
|
125
126
|
("lamindb", "0102_remove_writelog_branch_code_and_more"),
|
126
127
|
("lamindb", "0103_remove_writelog_migration_state_and_more"),
|
127
128
|
("lamindb", "0104_alter_branch_uid"),
|
129
|
+
("lamindb", "0105_record_unique_name"),
|
130
|
+
("lamindb", "0106_transfer_data_migration"),
|
131
|
+
("lamindb", "0107_add_schema_to_record"),
|
132
|
+
("lamindb", "0108_remove_record_sheet_remove_sheetproject_sheet_and_more"),
|
133
|
+
("lamindb", "0109_record_input_of_runs_alter_record_run_and_more"),
|
134
|
+
("lamindb", "0110_rename_values_artifacts_record_linked_artifacts"),
|
135
|
+
("lamindb", "0111_remove_record__sort_order"),
|
136
|
+
("lamindb", "0112_alter_recordartifact_feature_and_more"),
|
137
|
+
("lamindb", "0113_lower_case_branch_and_space_names"),
|
138
|
+
("lamindb", "0114_alter_run__status_code"),
|
139
|
+
("lamindb", "0115_alter_space_uid"),
|
128
140
|
]
|
129
141
|
|
130
142
|
dependencies = [] # type: ignore
|
@@ -193,10 +205,6 @@ class Migration(migrations.Migration):
|
|
193
205
|
),
|
194
206
|
),
|
195
207
|
],
|
196
|
-
options={
|
197
|
-
"abstract": False,
|
198
|
-
"base_manager_name": "objects",
|
199
|
-
},
|
200
208
|
),
|
201
209
|
migrations.CreateModel(
|
202
210
|
name="Space",
|
@@ -207,9 +215,9 @@ class Migration(migrations.Migration):
|
|
207
215
|
"uid",
|
208
216
|
lamindb.base.fields.CharField(
|
209
217
|
blank=True,
|
210
|
-
db_default="
|
218
|
+
db_default="aaaaaaaaaaaa",
|
211
219
|
db_index=True,
|
212
|
-
default="
|
220
|
+
default="aaaaaaaaaaaaa",
|
213
221
|
editable=False,
|
214
222
|
max_length=12,
|
215
223
|
unique=True,
|
@@ -231,10 +239,6 @@ class Migration(migrations.Migration):
|
|
231
239
|
),
|
232
240
|
),
|
233
241
|
],
|
234
|
-
options={
|
235
|
-
"abstract": False,
|
236
|
-
"base_manager_name": "objects",
|
237
|
-
},
|
238
242
|
),
|
239
243
|
migrations.CreateModel(
|
240
244
|
name="User",
|
@@ -892,6 +896,44 @@ class Migration(migrations.Migration):
|
|
892
896
|
],
|
893
897
|
bases=(lamindb.models.sqlrecord.IsLink, models.Model),
|
894
898
|
),
|
899
|
+
migrations.CreateModel(
|
900
|
+
name="ArtifactRecord",
|
901
|
+
fields=[
|
902
|
+
("id", models.BigAutoField(primary_key=True, serialize=False)),
|
903
|
+
(
|
904
|
+
"label_ref_is_name",
|
905
|
+
lamindb.base.fields.BooleanField(
|
906
|
+
blank=True, default=None, null=True
|
907
|
+
),
|
908
|
+
),
|
909
|
+
(
|
910
|
+
"feature_ref_is_name",
|
911
|
+
lamindb.base.fields.BooleanField(
|
912
|
+
blank=True, default=None, null=True
|
913
|
+
),
|
914
|
+
),
|
915
|
+
(
|
916
|
+
"artifact",
|
917
|
+
lamindb.base.fields.ForeignKey(
|
918
|
+
blank=True,
|
919
|
+
on_delete=django.db.models.deletion.CASCADE,
|
920
|
+
related_name="links_record",
|
921
|
+
to="lamindb.artifact",
|
922
|
+
),
|
923
|
+
),
|
924
|
+
(
|
925
|
+
"feature",
|
926
|
+
lamindb.base.fields.ForeignKey(
|
927
|
+
blank=True,
|
928
|
+
null=True,
|
929
|
+
on_delete=django.db.models.deletion.PROTECT,
|
930
|
+
related_name="links_artifactrecord",
|
931
|
+
to="lamindb.feature",
|
932
|
+
),
|
933
|
+
),
|
934
|
+
],
|
935
|
+
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
936
|
+
),
|
895
937
|
migrations.CreateModel(
|
896
938
|
name="ArtifactProject",
|
897
939
|
fields=[
|
@@ -1429,7 +1471,7 @@ class Migration(migrations.Migration):
|
|
1429
1471
|
(
|
1430
1472
|
"is_type",
|
1431
1473
|
lamindb.base.fields.BooleanField(
|
1432
|
-
blank=True, db_index=True, default=False
|
1474
|
+
blank=True, db_index=True, default=False
|
1433
1475
|
),
|
1434
1476
|
),
|
1435
1477
|
(
|
@@ -1438,6 +1480,14 @@ class Migration(migrations.Migration):
|
|
1438
1480
|
blank=True, default=None, max_length=255, null=True
|
1439
1481
|
),
|
1440
1482
|
),
|
1483
|
+
(
|
1484
|
+
"artifacts",
|
1485
|
+
models.ManyToManyField(
|
1486
|
+
related_name="records",
|
1487
|
+
through="lamindb.ArtifactRecord",
|
1488
|
+
to="lamindb.artifact",
|
1489
|
+
),
|
1490
|
+
),
|
1441
1491
|
(
|
1442
1492
|
"branch",
|
1443
1493
|
lamindb.base.fields.ForeignKey(
|
@@ -1466,6 +1516,16 @@ class Migration(migrations.Migration):
|
|
1466
1516
|
},
|
1467
1517
|
bases=(lamindb.models.can_curate.CanCurate, models.Model),
|
1468
1518
|
),
|
1519
|
+
migrations.AddField(
|
1520
|
+
model_name="artifactrecord",
|
1521
|
+
name="record",
|
1522
|
+
field=lamindb.base.fields.ForeignKey(
|
1523
|
+
blank=True,
|
1524
|
+
on_delete=django.db.models.deletion.PROTECT,
|
1525
|
+
related_name="links_artifact",
|
1526
|
+
to="lamindb.record",
|
1527
|
+
),
|
1528
|
+
),
|
1469
1529
|
migrations.CreateModel(
|
1470
1530
|
name="RecordArtifact",
|
1471
1531
|
fields=[
|
@@ -1474,7 +1534,7 @@ class Migration(migrations.Migration):
|
|
1474
1534
|
"feature",
|
1475
1535
|
lamindb.base.fields.ForeignKey(
|
1476
1536
|
blank=True,
|
1477
|
-
on_delete=django.db.models.deletion.
|
1537
|
+
on_delete=django.db.models.deletion.PROTECT,
|
1478
1538
|
related_name="links_recordartifact",
|
1479
1539
|
to="lamindb.feature",
|
1480
1540
|
),
|
@@ -1493,7 +1553,7 @@ class Migration(migrations.Migration):
|
|
1493
1553
|
lamindb.base.fields.ForeignKey(
|
1494
1554
|
blank=True,
|
1495
1555
|
on_delete=django.db.models.deletion.PROTECT,
|
1496
|
-
related_name="
|
1556
|
+
related_name="links_in_record",
|
1497
1557
|
to="lamindb.artifact",
|
1498
1558
|
),
|
1499
1559
|
),
|
@@ -1505,22 +1565,68 @@ class Migration(migrations.Migration):
|
|
1505
1565
|
),
|
1506
1566
|
migrations.AddField(
|
1507
1567
|
model_name="record",
|
1508
|
-
name="
|
1568
|
+
name="linked_artifacts",
|
1509
1569
|
field=models.ManyToManyField(
|
1510
|
-
related_name="
|
1570
|
+
related_name="linked_in_records",
|
1511
1571
|
through="lamindb.RecordArtifact",
|
1512
1572
|
to="lamindb.artifact",
|
1513
1573
|
),
|
1514
1574
|
),
|
1515
1575
|
migrations.CreateModel(
|
1516
|
-
name="
|
1576
|
+
name="RecordPerson",
|
1517
1577
|
fields=[
|
1518
1578
|
("id", models.BigAutoField(primary_key=True, serialize=False)),
|
1519
1579
|
(
|
1520
1580
|
"feature",
|
1581
|
+
lamindb.base.fields.ForeignKey(
|
1582
|
+
blank=True,
|
1583
|
+
on_delete=django.db.models.deletion.PROTECT,
|
1584
|
+
related_name="links_recordperson",
|
1585
|
+
to="lamindb.feature",
|
1586
|
+
),
|
1587
|
+
),
|
1588
|
+
(
|
1589
|
+
"record",
|
1521
1590
|
lamindb.base.fields.ForeignKey(
|
1522
1591
|
blank=True,
|
1523
1592
|
on_delete=django.db.models.deletion.CASCADE,
|
1593
|
+
related_name="values_person",
|
1594
|
+
to="lamindb.record",
|
1595
|
+
),
|
1596
|
+
),
|
1597
|
+
(
|
1598
|
+
"value",
|
1599
|
+
lamindb.base.fields.ForeignKey(
|
1600
|
+
blank=True,
|
1601
|
+
on_delete=django.db.models.deletion.PROTECT,
|
1602
|
+
related_name="links_record",
|
1603
|
+
to="lamindb.person",
|
1604
|
+
),
|
1605
|
+
),
|
1606
|
+
],
|
1607
|
+
options={
|
1608
|
+
"unique_together": {("record", "feature", "value")},
|
1609
|
+
},
|
1610
|
+
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
1611
|
+
),
|
1612
|
+
migrations.AddField(
|
1613
|
+
model_name="person",
|
1614
|
+
name="records",
|
1615
|
+
field=models.ManyToManyField(
|
1616
|
+
related_name="linked_people",
|
1617
|
+
through="lamindb.RecordPerson",
|
1618
|
+
to="lamindb.record",
|
1619
|
+
),
|
1620
|
+
),
|
1621
|
+
migrations.CreateModel(
|
1622
|
+
name="RecordProject",
|
1623
|
+
fields=[
|
1624
|
+
("id", models.BigAutoField(primary_key=True, serialize=False)),
|
1625
|
+
(
|
1626
|
+
"feature",
|
1627
|
+
lamindb.base.fields.ForeignKey(
|
1628
|
+
blank=True,
|
1629
|
+
on_delete=django.db.models.deletion.PROTECT,
|
1524
1630
|
related_name="links_recordproject",
|
1525
1631
|
to="lamindb.feature",
|
1526
1632
|
),
|
@@ -1545,7 +1651,7 @@ class Migration(migrations.Migration):
|
|
1545
1651
|
),
|
1546
1652
|
],
|
1547
1653
|
options={
|
1548
|
-
"unique_together": {("record", "feature")},
|
1654
|
+
"unique_together": {("record", "feature", "value")},
|
1549
1655
|
},
|
1550
1656
|
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
1551
1657
|
),
|
@@ -1553,7 +1659,7 @@ class Migration(migrations.Migration):
|
|
1553
1659
|
model_name="project",
|
1554
1660
|
name="records",
|
1555
1661
|
field=models.ManyToManyField(
|
1556
|
-
related_name="
|
1662
|
+
related_name="linked_projects",
|
1557
1663
|
through="lamindb.RecordProject",
|
1558
1664
|
to="lamindb.record",
|
1559
1665
|
),
|
@@ -1584,7 +1690,7 @@ class Migration(migrations.Migration):
|
|
1584
1690
|
"feature",
|
1585
1691
|
lamindb.base.fields.ForeignKey(
|
1586
1692
|
blank=True,
|
1587
|
-
on_delete=django.db.models.deletion.
|
1693
|
+
on_delete=django.db.models.deletion.PROTECT,
|
1588
1694
|
related_name="links_recordrecord",
|
1589
1695
|
to="lamindb.feature",
|
1590
1696
|
),
|
@@ -1620,7 +1726,7 @@ class Migration(migrations.Migration):
|
|
1620
1726
|
),
|
1621
1727
|
],
|
1622
1728
|
options={
|
1623
|
-
"unique_together": {("record", "feature")},
|
1729
|
+
"unique_together": {("record", "feature", "value")},
|
1624
1730
|
},
|
1625
1731
|
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
1626
1732
|
),
|
@@ -1633,6 +1739,31 @@ class Migration(migrations.Migration):
|
|
1633
1739
|
to="lamindb.record",
|
1634
1740
|
),
|
1635
1741
|
),
|
1742
|
+
migrations.CreateModel(
|
1743
|
+
name="RecordReference",
|
1744
|
+
fields=[
|
1745
|
+
("id", models.BigAutoField(primary_key=True, serialize=False)),
|
1746
|
+
(
|
1747
|
+
"feature",
|
1748
|
+
lamindb.base.fields.ForeignKey(
|
1749
|
+
blank=True,
|
1750
|
+
on_delete=django.db.models.deletion.PROTECT,
|
1751
|
+
related_name="links_recordreference",
|
1752
|
+
to="lamindb.feature",
|
1753
|
+
),
|
1754
|
+
),
|
1755
|
+
(
|
1756
|
+
"record",
|
1757
|
+
lamindb.base.fields.ForeignKey(
|
1758
|
+
blank=True,
|
1759
|
+
on_delete=django.db.models.deletion.CASCADE,
|
1760
|
+
related_name="values_reference",
|
1761
|
+
to="lamindb.record",
|
1762
|
+
),
|
1763
|
+
),
|
1764
|
+
],
|
1765
|
+
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
1766
|
+
),
|
1636
1767
|
migrations.CreateModel(
|
1637
1768
|
name="Reference",
|
1638
1769
|
fields=[
|
@@ -1769,6 +1900,14 @@ class Migration(migrations.Migration):
|
|
1769
1900
|
to="lamindb.collection",
|
1770
1901
|
),
|
1771
1902
|
),
|
1903
|
+
(
|
1904
|
+
"records",
|
1905
|
+
models.ManyToManyField(
|
1906
|
+
related_name="linked_references",
|
1907
|
+
through="lamindb.RecordReference",
|
1908
|
+
to="lamindb.record",
|
1909
|
+
),
|
1910
|
+
),
|
1772
1911
|
(
|
1773
1912
|
"type",
|
1774
1913
|
lamindb.base.fields.ForeignKey(
|
@@ -1789,6 +1928,16 @@ class Migration(migrations.Migration):
|
|
1789
1928
|
lamindb.models.sqlrecord.ValidateFields,
|
1790
1929
|
),
|
1791
1930
|
),
|
1931
|
+
migrations.AddField(
|
1932
|
+
model_name="recordreference",
|
1933
|
+
name="value",
|
1934
|
+
field=lamindb.base.fields.ForeignKey(
|
1935
|
+
blank=True,
|
1936
|
+
on_delete=django.db.models.deletion.PROTECT,
|
1937
|
+
related_name="links_record",
|
1938
|
+
to="lamindb.reference",
|
1939
|
+
),
|
1940
|
+
),
|
1792
1941
|
migrations.AddField(
|
1793
1942
|
model_name="project",
|
1794
1943
|
name="references",
|
@@ -1893,7 +2042,10 @@ class Migration(migrations.Migration):
|
|
1893
2042
|
blank=True, default=None, null=True
|
1894
2043
|
),
|
1895
2044
|
),
|
1896
|
-
(
|
2045
|
+
(
|
2046
|
+
"_status_code",
|
2047
|
+
models.SmallIntegerField(db_index=True, default=None, null=True),
|
2048
|
+
),
|
1897
2049
|
(
|
1898
2050
|
"_logfile",
|
1899
2051
|
lamindb.base.fields.ForeignKey(
|
@@ -1975,7 +2127,7 @@ class Migration(migrations.Migration):
|
|
1975
2127
|
"feature",
|
1976
2128
|
lamindb.base.fields.ForeignKey(
|
1977
2129
|
blank=True,
|
1978
|
-
on_delete=django.db.models.deletion.
|
2130
|
+
on_delete=django.db.models.deletion.PROTECT,
|
1979
2131
|
related_name="links_recordrun",
|
1980
2132
|
to="lamindb.feature",
|
1981
2133
|
),
|
@@ -2000,29 +2152,37 @@ class Migration(migrations.Migration):
|
|
2000
2152
|
),
|
2001
2153
|
],
|
2002
2154
|
options={
|
2003
|
-
"unique_together": {("record", "feature")},
|
2155
|
+
"unique_together": {("record", "feature", "value")},
|
2004
2156
|
},
|
2005
2157
|
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
2006
2158
|
),
|
2007
2159
|
migrations.AddField(
|
2008
2160
|
model_name="record",
|
2009
|
-
name="
|
2010
|
-
field=
|
2011
|
-
|
2012
|
-
default=lamindb.models.run.current_run,
|
2013
|
-
null=True,
|
2014
|
-
on_delete=django.db.models.deletion.PROTECT,
|
2015
|
-
related_name="+",
|
2016
|
-
to="lamindb.run",
|
2161
|
+
name="input_of_runs",
|
2162
|
+
field=models.ManyToManyField(
|
2163
|
+
related_name="input_records", to="lamindb.run"
|
2017
2164
|
),
|
2018
2165
|
),
|
2019
2166
|
migrations.AddField(
|
2020
2167
|
model_name="record",
|
2021
|
-
name="
|
2168
|
+
name="linked_runs",
|
2022
2169
|
field=models.ManyToManyField(
|
2023
2170
|
related_name="records", through="lamindb.RecordRun", to="lamindb.run"
|
2024
2171
|
),
|
2025
2172
|
),
|
2173
|
+
migrations.AddField(
|
2174
|
+
model_name="record",
|
2175
|
+
name="run",
|
2176
|
+
field=lamindb.base.fields.ForeignKey(
|
2177
|
+
blank=True,
|
2178
|
+
default=None,
|
2179
|
+
editable=False,
|
2180
|
+
null=True,
|
2181
|
+
on_delete=django.db.models.deletion.PROTECT,
|
2182
|
+
related_name="output_records",
|
2183
|
+
to="lamindb.run",
|
2184
|
+
),
|
2185
|
+
),
|
2026
2186
|
migrations.AddField(
|
2027
2187
|
model_name="project",
|
2028
2188
|
name="run",
|
@@ -2266,9 +2426,6 @@ class Migration(migrations.Migration):
|
|
2266
2426
|
),
|
2267
2427
|
),
|
2268
2428
|
],
|
2269
|
-
options={
|
2270
|
-
"unique_together": {("run", "featurevalue")},
|
2271
|
-
},
|
2272
2429
|
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
2273
2430
|
),
|
2274
2431
|
migrations.AddField(
|
@@ -2323,9 +2480,6 @@ class Migration(migrations.Migration):
|
|
2323
2480
|
),
|
2324
2481
|
),
|
2325
2482
|
],
|
2326
|
-
options={
|
2327
|
-
"unique_together": {("run", "project")},
|
2328
|
-
},
|
2329
2483
|
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
2330
2484
|
),
|
2331
2485
|
migrations.AddField(
|
@@ -2529,6 +2683,17 @@ class Migration(migrations.Migration):
|
|
2529
2683
|
},
|
2530
2684
|
bases=(lamindb.models.can_curate.CanCurate, models.Model),
|
2531
2685
|
),
|
2686
|
+
migrations.AddField(
|
2687
|
+
model_name="record",
|
2688
|
+
name="schema",
|
2689
|
+
field=lamindb.base.fields.ForeignKey(
|
2690
|
+
blank=True,
|
2691
|
+
null=True,
|
2692
|
+
on_delete=django.db.models.deletion.CASCADE,
|
2693
|
+
related_name="records",
|
2694
|
+
to="lamindb.schema",
|
2695
|
+
),
|
2696
|
+
),
|
2532
2697
|
migrations.CreateModel(
|
2533
2698
|
name="ArtifactSchema",
|
2534
2699
|
fields=[
|
@@ -2595,9 +2760,6 @@ class Migration(migrations.Migration):
|
|
2595
2760
|
),
|
2596
2761
|
),
|
2597
2762
|
],
|
2598
|
-
options={
|
2599
|
-
"unique_together": {("artifact", "schema"), ("artifact", "slot")},
|
2600
|
-
},
|
2601
2763
|
bases=(lamindb.models.sqlrecord.IsLink, models.Model),
|
2602
2764
|
),
|
2603
2765
|
migrations.AddField(
|
@@ -2681,12 +2843,6 @@ class Migration(migrations.Migration):
|
|
2681
2843
|
),
|
2682
2844
|
),
|
2683
2845
|
],
|
2684
|
-
options={
|
2685
|
-
"unique_together": {
|
2686
|
-
("composite", "slot"),
|
2687
|
-
("composite", "slot", "component"),
|
2688
|
-
},
|
2689
|
-
},
|
2690
2846
|
bases=(lamindb.models.sqlrecord.IsLink, models.Model),
|
2691
2847
|
),
|
2692
2848
|
migrations.AddField(
|
@@ -2789,9 +2945,6 @@ class Migration(migrations.Migration):
|
|
2789
2945
|
),
|
2790
2946
|
),
|
2791
2947
|
],
|
2792
|
-
options={
|
2793
|
-
"unique_together": {("schema", "project")},
|
2794
|
-
},
|
2795
2948
|
bases=(lamindb.models.sqlrecord.IsLink, models.Model),
|
2796
2949
|
),
|
2797
2950
|
migrations.AddField(
|
@@ -2803,200 +2956,6 @@ class Migration(migrations.Migration):
|
|
2803
2956
|
to="lamindb.schema",
|
2804
2957
|
),
|
2805
2958
|
),
|
2806
|
-
migrations.CreateModel(
|
2807
|
-
name="Sheet",
|
2808
|
-
fields=[
|
2809
|
-
(
|
2810
|
-
"_aux",
|
2811
|
-
lamindb.base.fields.JSONField(
|
2812
|
-
blank=True, db_default=None, default=None, null=True
|
2813
|
-
),
|
2814
|
-
),
|
2815
|
-
(
|
2816
|
-
"created_at",
|
2817
|
-
lamindb.base.fields.DateTimeField(
|
2818
|
-
blank=True,
|
2819
|
-
db_default=django.db.models.functions.datetime.Now(),
|
2820
|
-
db_index=True,
|
2821
|
-
editable=False,
|
2822
|
-
),
|
2823
|
-
),
|
2824
|
-
(
|
2825
|
-
"updated_at",
|
2826
|
-
lamindb.base.fields.DateTimeField(
|
2827
|
-
blank=True,
|
2828
|
-
db_default=django.db.models.functions.datetime.Now(),
|
2829
|
-
db_index=True,
|
2830
|
-
editable=False,
|
2831
|
-
),
|
2832
|
-
),
|
2833
|
-
("id", models.AutoField(primary_key=True, serialize=False)),
|
2834
|
-
(
|
2835
|
-
"uid",
|
2836
|
-
lamindb.base.fields.CharField(
|
2837
|
-
blank=True,
|
2838
|
-
db_index=True,
|
2839
|
-
default=lamindb.base.uids.base62_12,
|
2840
|
-
editable=False,
|
2841
|
-
max_length=12,
|
2842
|
-
unique=True,
|
2843
|
-
),
|
2844
|
-
),
|
2845
|
-
(
|
2846
|
-
"name",
|
2847
|
-
lamindb.base.fields.CharField(
|
2848
|
-
blank=True, db_index=True, default=None, max_length=255
|
2849
|
-
),
|
2850
|
-
),
|
2851
|
-
(
|
2852
|
-
"description",
|
2853
|
-
lamindb.base.fields.CharField(
|
2854
|
-
blank=True,
|
2855
|
-
db_index=True,
|
2856
|
-
default=None,
|
2857
|
-
max_length=255,
|
2858
|
-
null=True,
|
2859
|
-
),
|
2860
|
-
),
|
2861
|
-
(
|
2862
|
-
"branch",
|
2863
|
-
lamindb.base.fields.ForeignKey(
|
2864
|
-
blank=True,
|
2865
|
-
db_column="_branch_code",
|
2866
|
-
db_default=1,
|
2867
|
-
default=1,
|
2868
|
-
on_delete=django.db.models.deletion.PROTECT,
|
2869
|
-
related_name="+",
|
2870
|
-
to="lamindb.branch",
|
2871
|
-
),
|
2872
|
-
),
|
2873
|
-
(
|
2874
|
-
"run",
|
2875
|
-
lamindb.base.fields.ForeignKey(
|
2876
|
-
blank=True,
|
2877
|
-
default=lamindb.models.run.current_run,
|
2878
|
-
null=True,
|
2879
|
-
on_delete=django.db.models.deletion.PROTECT,
|
2880
|
-
related_name="+",
|
2881
|
-
to="lamindb.run",
|
2882
|
-
),
|
2883
|
-
),
|
2884
|
-
(
|
2885
|
-
"schema",
|
2886
|
-
lamindb.base.fields.ForeignKey(
|
2887
|
-
blank=True,
|
2888
|
-
null=True,
|
2889
|
-
on_delete=django.db.models.deletion.CASCADE,
|
2890
|
-
related_name="sheets",
|
2891
|
-
to="lamindb.schema",
|
2892
|
-
),
|
2893
|
-
),
|
2894
|
-
(
|
2895
|
-
"space",
|
2896
|
-
lamindb.base.fields.ForeignKey(
|
2897
|
-
blank=True,
|
2898
|
-
db_default=1,
|
2899
|
-
default=1,
|
2900
|
-
on_delete=django.db.models.deletion.PROTECT,
|
2901
|
-
related_name="+",
|
2902
|
-
to="lamindb.space",
|
2903
|
-
),
|
2904
|
-
),
|
2905
|
-
(
|
2906
|
-
"created_by",
|
2907
|
-
lamindb.base.fields.ForeignKey(
|
2908
|
-
blank=True,
|
2909
|
-
default=lamindb.base.users.current_user_id,
|
2910
|
-
editable=False,
|
2911
|
-
on_delete=django.db.models.deletion.PROTECT,
|
2912
|
-
related_name="+",
|
2913
|
-
to="lamindb.user",
|
2914
|
-
),
|
2915
|
-
),
|
2916
|
-
],
|
2917
|
-
options={
|
2918
|
-
"abstract": False,
|
2919
|
-
},
|
2920
|
-
),
|
2921
|
-
migrations.AddField(
|
2922
|
-
model_name="record",
|
2923
|
-
name="sheet",
|
2924
|
-
field=lamindb.base.fields.ForeignKey(
|
2925
|
-
blank=True,
|
2926
|
-
null=True,
|
2927
|
-
on_delete=django.db.models.deletion.CASCADE,
|
2928
|
-
related_name="records",
|
2929
|
-
to="lamindb.sheet",
|
2930
|
-
),
|
2931
|
-
),
|
2932
|
-
migrations.CreateModel(
|
2933
|
-
name="SheetProject",
|
2934
|
-
fields=[
|
2935
|
-
(
|
2936
|
-
"created_at",
|
2937
|
-
lamindb.base.fields.DateTimeField(
|
2938
|
-
blank=True,
|
2939
|
-
db_default=django.db.models.functions.datetime.Now(),
|
2940
|
-
db_index=True,
|
2941
|
-
editable=False,
|
2942
|
-
),
|
2943
|
-
),
|
2944
|
-
("id", models.BigAutoField(primary_key=True, serialize=False)),
|
2945
|
-
(
|
2946
|
-
"project",
|
2947
|
-
lamindb.base.fields.ForeignKey(
|
2948
|
-
blank=True,
|
2949
|
-
on_delete=django.db.models.deletion.PROTECT,
|
2950
|
-
related_name="links_sheet",
|
2951
|
-
to="lamindb.project",
|
2952
|
-
),
|
2953
|
-
),
|
2954
|
-
(
|
2955
|
-
"run",
|
2956
|
-
lamindb.base.fields.ForeignKey(
|
2957
|
-
blank=True,
|
2958
|
-
default=lamindb.models.run.current_run,
|
2959
|
-
null=True,
|
2960
|
-
on_delete=django.db.models.deletion.PROTECT,
|
2961
|
-
related_name="+",
|
2962
|
-
to="lamindb.run",
|
2963
|
-
),
|
2964
|
-
),
|
2965
|
-
(
|
2966
|
-
"sheet",
|
2967
|
-
lamindb.base.fields.ForeignKey(
|
2968
|
-
blank=True,
|
2969
|
-
on_delete=django.db.models.deletion.CASCADE,
|
2970
|
-
related_name="links_project",
|
2971
|
-
to="lamindb.sheet",
|
2972
|
-
),
|
2973
|
-
),
|
2974
|
-
(
|
2975
|
-
"created_by",
|
2976
|
-
lamindb.base.fields.ForeignKey(
|
2977
|
-
blank=True,
|
2978
|
-
default=lamindb.base.users.current_user_id,
|
2979
|
-
editable=False,
|
2980
|
-
on_delete=django.db.models.deletion.PROTECT,
|
2981
|
-
related_name="+",
|
2982
|
-
to="lamindb.user",
|
2983
|
-
),
|
2984
|
-
),
|
2985
|
-
],
|
2986
|
-
options={
|
2987
|
-
"unique_together": {("sheet", "project")},
|
2988
|
-
},
|
2989
|
-
bases=(lamindb.models.sqlrecord.IsLink, models.Model),
|
2990
|
-
),
|
2991
|
-
migrations.AddField(
|
2992
|
-
model_name="project",
|
2993
|
-
name="sheets",
|
2994
|
-
field=models.ManyToManyField(
|
2995
|
-
related_name="projects",
|
2996
|
-
through="lamindb.SheetProject",
|
2997
|
-
to="lamindb.sheet",
|
2998
|
-
),
|
2999
|
-
),
|
3000
2959
|
migrations.AddField(
|
3001
2960
|
model_name="schema",
|
3002
2961
|
name="space",
|
@@ -3831,9 +3790,6 @@ class Migration(migrations.Migration):
|
|
3831
3790
|
),
|
3832
3791
|
),
|
3833
3792
|
],
|
3834
|
-
options={
|
3835
|
-
"unique_together": {("run", "ulabel")},
|
3836
|
-
},
|
3837
3793
|
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
3838
3794
|
),
|
3839
3795
|
migrations.AddField(
|
@@ -3851,7 +3807,7 @@ class Migration(migrations.Migration):
|
|
3851
3807
|
"feature",
|
3852
3808
|
lamindb.base.fields.ForeignKey(
|
3853
3809
|
blank=True,
|
3854
|
-
on_delete=django.db.models.deletion.
|
3810
|
+
on_delete=django.db.models.deletion.PROTECT,
|
3855
3811
|
related_name="links_recordulabel",
|
3856
3812
|
to="lamindb.feature",
|
3857
3813
|
),
|
@@ -3876,7 +3832,7 @@ class Migration(migrations.Migration):
|
|
3876
3832
|
),
|
3877
3833
|
],
|
3878
3834
|
options={
|
3879
|
-
"unique_together": {("record", "feature")},
|
3835
|
+
"unique_together": {("record", "feature", "value")},
|
3880
3836
|
},
|
3881
3837
|
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
3882
3838
|
),
|
@@ -3966,9 +3922,6 @@ class Migration(migrations.Migration):
|
|
3966
3922
|
),
|
3967
3923
|
),
|
3968
3924
|
],
|
3969
|
-
options={
|
3970
|
-
"unique_together": {("collection", "ulabel")},
|
3971
|
-
},
|
3972
3925
|
bases=(lamindb.models.sqlrecord.IsLink, models.Model),
|
3973
3926
|
),
|
3974
3927
|
migrations.AddField(
|
@@ -4057,9 +4010,6 @@ class Migration(migrations.Migration):
|
|
4057
4010
|
),
|
4058
4011
|
),
|
4059
4012
|
],
|
4060
|
-
options={
|
4061
|
-
"unique_together": {("artifact", "ulabel", "feature")},
|
4062
|
-
},
|
4063
4013
|
bases=(lamindb.models.sqlrecord.IsLink, models.Model),
|
4064
4014
|
),
|
4065
4015
|
migrations.AddField(
|
@@ -4389,6 +4339,10 @@ class Migration(migrations.Migration):
|
|
4389
4339
|
to="lamindb.user",
|
4390
4340
|
),
|
4391
4341
|
),
|
4342
|
+
migrations.AlterUniqueTogether(
|
4343
|
+
name="artifactrecord",
|
4344
|
+
unique_together={("artifact", "record", "feature")},
|
4345
|
+
),
|
4392
4346
|
migrations.CreateModel(
|
4393
4347
|
name="RecordJson",
|
4394
4348
|
fields=[
|
@@ -4403,7 +4357,7 @@ class Migration(migrations.Migration):
|
|
4403
4357
|
"feature",
|
4404
4358
|
lamindb.base.fields.ForeignKey(
|
4405
4359
|
blank=True,
|
4406
|
-
on_delete=django.db.models.deletion.
|
4360
|
+
on_delete=django.db.models.deletion.PROTECT,
|
4407
4361
|
related_name="links_recordjson",
|
4408
4362
|
to="lamindb.feature",
|
4409
4363
|
),
|
@@ -4423,10 +4377,41 @@ class Migration(migrations.Migration):
|
|
4423
4377
|
},
|
4424
4378
|
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
4425
4379
|
),
|
4380
|
+
migrations.AlterUniqueTogether(
|
4381
|
+
name="recordreference",
|
4382
|
+
unique_together={("record", "feature", "value")},
|
4383
|
+
),
|
4426
4384
|
migrations.AlterUniqueTogether(
|
4427
4385
|
name="transform",
|
4428
4386
|
unique_together={("key", "hash")},
|
4429
4387
|
),
|
4388
|
+
migrations.AddConstraint(
|
4389
|
+
model_name="space",
|
4390
|
+
constraint=models.UniqueConstraint(
|
4391
|
+
django.db.models.functions.text.Lower("name"),
|
4392
|
+
name="unique_space_name_lower",
|
4393
|
+
),
|
4394
|
+
),
|
4395
|
+
migrations.AlterUniqueTogether(
|
4396
|
+
name="schemaproject",
|
4397
|
+
unique_together={("schema", "project")},
|
4398
|
+
),
|
4399
|
+
migrations.AlterUniqueTogether(
|
4400
|
+
name="schemacomponent",
|
4401
|
+
unique_together={("composite", "slot"), ("composite", "slot", "component")},
|
4402
|
+
),
|
4403
|
+
migrations.AlterUniqueTogether(
|
4404
|
+
name="runulabel",
|
4405
|
+
unique_together={("run", "ulabel")},
|
4406
|
+
),
|
4407
|
+
migrations.AlterUniqueTogether(
|
4408
|
+
name="runproject",
|
4409
|
+
unique_together={("run", "project")},
|
4410
|
+
),
|
4411
|
+
migrations.AlterUniqueTogether(
|
4412
|
+
name="runfeaturevalue",
|
4413
|
+
unique_together={("run", "featurevalue")},
|
4414
|
+
),
|
4430
4415
|
migrations.AlterUniqueTogether(
|
4431
4416
|
name="personproject",
|
4432
4417
|
unique_together={("person", "project")},
|
@@ -4439,6 +4424,10 @@ class Migration(migrations.Migration):
|
|
4439
4424
|
name="featureproject",
|
4440
4425
|
unique_together={("feature", "project")},
|
4441
4426
|
),
|
4427
|
+
migrations.AlterUniqueTogether(
|
4428
|
+
name="collectionulabel",
|
4429
|
+
unique_together={("collection", "ulabel")},
|
4430
|
+
),
|
4442
4431
|
migrations.AlterUniqueTogether(
|
4443
4432
|
name="collectionreference",
|
4444
4433
|
unique_together={("collection", "reference")},
|
@@ -4451,6 +4440,21 @@ class Migration(migrations.Migration):
|
|
4451
4440
|
name="collectionartifact",
|
4452
4441
|
unique_together={("collection", "artifact")},
|
4453
4442
|
),
|
4443
|
+
migrations.AddConstraint(
|
4444
|
+
model_name="branch",
|
4445
|
+
constraint=models.UniqueConstraint(
|
4446
|
+
django.db.models.functions.text.Lower("name"),
|
4447
|
+
name="unique_branch_name_lower",
|
4448
|
+
),
|
4449
|
+
),
|
4450
|
+
migrations.AlterUniqueTogether(
|
4451
|
+
name="artifactulabel",
|
4452
|
+
unique_together={("artifact", "ulabel", "feature")},
|
4453
|
+
),
|
4454
|
+
migrations.AlterUniqueTogether(
|
4455
|
+
name="artifactschema",
|
4456
|
+
unique_together={("artifact", "schema"), ("artifact", "slot")},
|
4457
|
+
),
|
4454
4458
|
migrations.AlterUniqueTogether(
|
4455
4459
|
name="artifactreference",
|
4456
4460
|
unique_together={("artifact", "reference", "feature")},
|