lamindb 1.6.1__py3-none-any.whl → 1.7a1__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 +125 -55
- 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/{0104_squashed.py → 0114_squashed.py} +258 -255
- 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 +87 -32
- 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 +1 -1
- lamindb/setup/errors/__init__.py +4 -0
- lamindb/setup/types/__init__.py +4 -0
- {lamindb-1.6.1.dist-info → lamindb-1.7a1.dist-info}/METADATA +5 -5
- {lamindb-1.6.1.dist-info → lamindb-1.7a1.dist-info}/RECORD +59 -44
- lamindb/models/core.py +0 -135
- {lamindb-1.6.1.dist-info → lamindb-1.7a1.dist-info}/LICENSE +0 -0
- {lamindb-1.6.1.dist-info → lamindb-1.7a1.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,16 @@ 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"),
|
128
139
|
]
|
129
140
|
|
130
141
|
dependencies = [] # type: ignore
|
@@ -193,10 +204,6 @@ class Migration(migrations.Migration):
|
|
193
204
|
),
|
194
205
|
),
|
195
206
|
],
|
196
|
-
options={
|
197
|
-
"abstract": False,
|
198
|
-
"base_manager_name": "objects",
|
199
|
-
},
|
200
207
|
),
|
201
208
|
migrations.CreateModel(
|
202
209
|
name="Space",
|
@@ -231,10 +238,6 @@ class Migration(migrations.Migration):
|
|
231
238
|
),
|
232
239
|
),
|
233
240
|
],
|
234
|
-
options={
|
235
|
-
"abstract": False,
|
236
|
-
"base_manager_name": "objects",
|
237
|
-
},
|
238
241
|
),
|
239
242
|
migrations.CreateModel(
|
240
243
|
name="User",
|
@@ -892,6 +895,44 @@ class Migration(migrations.Migration):
|
|
892
895
|
],
|
893
896
|
bases=(lamindb.models.sqlrecord.IsLink, models.Model),
|
894
897
|
),
|
898
|
+
migrations.CreateModel(
|
899
|
+
name="ArtifactRecord",
|
900
|
+
fields=[
|
901
|
+
("id", models.BigAutoField(primary_key=True, serialize=False)),
|
902
|
+
(
|
903
|
+
"label_ref_is_name",
|
904
|
+
lamindb.base.fields.BooleanField(
|
905
|
+
blank=True, default=None, null=True
|
906
|
+
),
|
907
|
+
),
|
908
|
+
(
|
909
|
+
"feature_ref_is_name",
|
910
|
+
lamindb.base.fields.BooleanField(
|
911
|
+
blank=True, default=None, null=True
|
912
|
+
),
|
913
|
+
),
|
914
|
+
(
|
915
|
+
"artifact",
|
916
|
+
lamindb.base.fields.ForeignKey(
|
917
|
+
blank=True,
|
918
|
+
on_delete=django.db.models.deletion.CASCADE,
|
919
|
+
related_name="links_record",
|
920
|
+
to="lamindb.artifact",
|
921
|
+
),
|
922
|
+
),
|
923
|
+
(
|
924
|
+
"feature",
|
925
|
+
lamindb.base.fields.ForeignKey(
|
926
|
+
blank=True,
|
927
|
+
null=True,
|
928
|
+
on_delete=django.db.models.deletion.PROTECT,
|
929
|
+
related_name="links_artifactrecord",
|
930
|
+
to="lamindb.feature",
|
931
|
+
),
|
932
|
+
),
|
933
|
+
],
|
934
|
+
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
935
|
+
),
|
895
936
|
migrations.CreateModel(
|
896
937
|
name="ArtifactProject",
|
897
938
|
fields=[
|
@@ -1429,7 +1470,7 @@ class Migration(migrations.Migration):
|
|
1429
1470
|
(
|
1430
1471
|
"is_type",
|
1431
1472
|
lamindb.base.fields.BooleanField(
|
1432
|
-
blank=True, db_index=True, default=False
|
1473
|
+
blank=True, db_index=True, default=False
|
1433
1474
|
),
|
1434
1475
|
),
|
1435
1476
|
(
|
@@ -1438,6 +1479,14 @@ class Migration(migrations.Migration):
|
|
1438
1479
|
blank=True, default=None, max_length=255, null=True
|
1439
1480
|
),
|
1440
1481
|
),
|
1482
|
+
(
|
1483
|
+
"artifacts",
|
1484
|
+
models.ManyToManyField(
|
1485
|
+
related_name="records",
|
1486
|
+
through="lamindb.ArtifactRecord",
|
1487
|
+
to="lamindb.artifact",
|
1488
|
+
),
|
1489
|
+
),
|
1441
1490
|
(
|
1442
1491
|
"branch",
|
1443
1492
|
lamindb.base.fields.ForeignKey(
|
@@ -1466,6 +1515,16 @@ class Migration(migrations.Migration):
|
|
1466
1515
|
},
|
1467
1516
|
bases=(lamindb.models.can_curate.CanCurate, models.Model),
|
1468
1517
|
),
|
1518
|
+
migrations.AddField(
|
1519
|
+
model_name="artifactrecord",
|
1520
|
+
name="record",
|
1521
|
+
field=lamindb.base.fields.ForeignKey(
|
1522
|
+
blank=True,
|
1523
|
+
on_delete=django.db.models.deletion.PROTECT,
|
1524
|
+
related_name="links_artifact",
|
1525
|
+
to="lamindb.record",
|
1526
|
+
),
|
1527
|
+
),
|
1469
1528
|
migrations.CreateModel(
|
1470
1529
|
name="RecordArtifact",
|
1471
1530
|
fields=[
|
@@ -1474,7 +1533,7 @@ class Migration(migrations.Migration):
|
|
1474
1533
|
"feature",
|
1475
1534
|
lamindb.base.fields.ForeignKey(
|
1476
1535
|
blank=True,
|
1477
|
-
on_delete=django.db.models.deletion.
|
1536
|
+
on_delete=django.db.models.deletion.PROTECT,
|
1478
1537
|
related_name="links_recordartifact",
|
1479
1538
|
to="lamindb.feature",
|
1480
1539
|
),
|
@@ -1493,7 +1552,7 @@ class Migration(migrations.Migration):
|
|
1493
1552
|
lamindb.base.fields.ForeignKey(
|
1494
1553
|
blank=True,
|
1495
1554
|
on_delete=django.db.models.deletion.PROTECT,
|
1496
|
-
related_name="
|
1555
|
+
related_name="links_in_record",
|
1497
1556
|
to="lamindb.artifact",
|
1498
1557
|
),
|
1499
1558
|
),
|
@@ -1505,22 +1564,68 @@ class Migration(migrations.Migration):
|
|
1505
1564
|
),
|
1506
1565
|
migrations.AddField(
|
1507
1566
|
model_name="record",
|
1508
|
-
name="
|
1567
|
+
name="linked_artifacts",
|
1509
1568
|
field=models.ManyToManyField(
|
1510
|
-
related_name="
|
1569
|
+
related_name="linked_in_records",
|
1511
1570
|
through="lamindb.RecordArtifact",
|
1512
1571
|
to="lamindb.artifact",
|
1513
1572
|
),
|
1514
1573
|
),
|
1515
1574
|
migrations.CreateModel(
|
1516
|
-
name="
|
1575
|
+
name="RecordPerson",
|
1517
1576
|
fields=[
|
1518
1577
|
("id", models.BigAutoField(primary_key=True, serialize=False)),
|
1519
1578
|
(
|
1520
1579
|
"feature",
|
1580
|
+
lamindb.base.fields.ForeignKey(
|
1581
|
+
blank=True,
|
1582
|
+
on_delete=django.db.models.deletion.PROTECT,
|
1583
|
+
related_name="links_recordperson",
|
1584
|
+
to="lamindb.feature",
|
1585
|
+
),
|
1586
|
+
),
|
1587
|
+
(
|
1588
|
+
"record",
|
1521
1589
|
lamindb.base.fields.ForeignKey(
|
1522
1590
|
blank=True,
|
1523
1591
|
on_delete=django.db.models.deletion.CASCADE,
|
1592
|
+
related_name="values_person",
|
1593
|
+
to="lamindb.record",
|
1594
|
+
),
|
1595
|
+
),
|
1596
|
+
(
|
1597
|
+
"value",
|
1598
|
+
lamindb.base.fields.ForeignKey(
|
1599
|
+
blank=True,
|
1600
|
+
on_delete=django.db.models.deletion.PROTECT,
|
1601
|
+
related_name="links_record",
|
1602
|
+
to="lamindb.person",
|
1603
|
+
),
|
1604
|
+
),
|
1605
|
+
],
|
1606
|
+
options={
|
1607
|
+
"unique_together": {("record", "feature", "value")},
|
1608
|
+
},
|
1609
|
+
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
1610
|
+
),
|
1611
|
+
migrations.AddField(
|
1612
|
+
model_name="person",
|
1613
|
+
name="records",
|
1614
|
+
field=models.ManyToManyField(
|
1615
|
+
related_name="linked_people",
|
1616
|
+
through="lamindb.RecordPerson",
|
1617
|
+
to="lamindb.record",
|
1618
|
+
),
|
1619
|
+
),
|
1620
|
+
migrations.CreateModel(
|
1621
|
+
name="RecordProject",
|
1622
|
+
fields=[
|
1623
|
+
("id", models.BigAutoField(primary_key=True, serialize=False)),
|
1624
|
+
(
|
1625
|
+
"feature",
|
1626
|
+
lamindb.base.fields.ForeignKey(
|
1627
|
+
blank=True,
|
1628
|
+
on_delete=django.db.models.deletion.PROTECT,
|
1524
1629
|
related_name="links_recordproject",
|
1525
1630
|
to="lamindb.feature",
|
1526
1631
|
),
|
@@ -1545,7 +1650,7 @@ class Migration(migrations.Migration):
|
|
1545
1650
|
),
|
1546
1651
|
],
|
1547
1652
|
options={
|
1548
|
-
"unique_together": {("record", "feature")},
|
1653
|
+
"unique_together": {("record", "feature", "value")},
|
1549
1654
|
},
|
1550
1655
|
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
1551
1656
|
),
|
@@ -1553,7 +1658,7 @@ class Migration(migrations.Migration):
|
|
1553
1658
|
model_name="project",
|
1554
1659
|
name="records",
|
1555
1660
|
field=models.ManyToManyField(
|
1556
|
-
related_name="
|
1661
|
+
related_name="linked_projects",
|
1557
1662
|
through="lamindb.RecordProject",
|
1558
1663
|
to="lamindb.record",
|
1559
1664
|
),
|
@@ -1584,7 +1689,7 @@ class Migration(migrations.Migration):
|
|
1584
1689
|
"feature",
|
1585
1690
|
lamindb.base.fields.ForeignKey(
|
1586
1691
|
blank=True,
|
1587
|
-
on_delete=django.db.models.deletion.
|
1692
|
+
on_delete=django.db.models.deletion.PROTECT,
|
1588
1693
|
related_name="links_recordrecord",
|
1589
1694
|
to="lamindb.feature",
|
1590
1695
|
),
|
@@ -1620,7 +1725,7 @@ class Migration(migrations.Migration):
|
|
1620
1725
|
),
|
1621
1726
|
],
|
1622
1727
|
options={
|
1623
|
-
"unique_together": {("record", "feature")},
|
1728
|
+
"unique_together": {("record", "feature", "value")},
|
1624
1729
|
},
|
1625
1730
|
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
1626
1731
|
),
|
@@ -1633,6 +1738,31 @@ class Migration(migrations.Migration):
|
|
1633
1738
|
to="lamindb.record",
|
1634
1739
|
),
|
1635
1740
|
),
|
1741
|
+
migrations.CreateModel(
|
1742
|
+
name="RecordReference",
|
1743
|
+
fields=[
|
1744
|
+
("id", models.BigAutoField(primary_key=True, serialize=False)),
|
1745
|
+
(
|
1746
|
+
"feature",
|
1747
|
+
lamindb.base.fields.ForeignKey(
|
1748
|
+
blank=True,
|
1749
|
+
on_delete=django.db.models.deletion.PROTECT,
|
1750
|
+
related_name="links_recordreference",
|
1751
|
+
to="lamindb.feature",
|
1752
|
+
),
|
1753
|
+
),
|
1754
|
+
(
|
1755
|
+
"record",
|
1756
|
+
lamindb.base.fields.ForeignKey(
|
1757
|
+
blank=True,
|
1758
|
+
on_delete=django.db.models.deletion.CASCADE,
|
1759
|
+
related_name="values_reference",
|
1760
|
+
to="lamindb.record",
|
1761
|
+
),
|
1762
|
+
),
|
1763
|
+
],
|
1764
|
+
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
1765
|
+
),
|
1636
1766
|
migrations.CreateModel(
|
1637
1767
|
name="Reference",
|
1638
1768
|
fields=[
|
@@ -1769,6 +1899,14 @@ class Migration(migrations.Migration):
|
|
1769
1899
|
to="lamindb.collection",
|
1770
1900
|
),
|
1771
1901
|
),
|
1902
|
+
(
|
1903
|
+
"records",
|
1904
|
+
models.ManyToManyField(
|
1905
|
+
related_name="linked_references",
|
1906
|
+
through="lamindb.RecordReference",
|
1907
|
+
to="lamindb.record",
|
1908
|
+
),
|
1909
|
+
),
|
1772
1910
|
(
|
1773
1911
|
"type",
|
1774
1912
|
lamindb.base.fields.ForeignKey(
|
@@ -1789,6 +1927,16 @@ class Migration(migrations.Migration):
|
|
1789
1927
|
lamindb.models.sqlrecord.ValidateFields,
|
1790
1928
|
),
|
1791
1929
|
),
|
1930
|
+
migrations.AddField(
|
1931
|
+
model_name="recordreference",
|
1932
|
+
name="value",
|
1933
|
+
field=lamindb.base.fields.ForeignKey(
|
1934
|
+
blank=True,
|
1935
|
+
on_delete=django.db.models.deletion.PROTECT,
|
1936
|
+
related_name="links_record",
|
1937
|
+
to="lamindb.reference",
|
1938
|
+
),
|
1939
|
+
),
|
1792
1940
|
migrations.AddField(
|
1793
1941
|
model_name="project",
|
1794
1942
|
name="references",
|
@@ -1893,7 +2041,10 @@ class Migration(migrations.Migration):
|
|
1893
2041
|
blank=True, default=None, null=True
|
1894
2042
|
),
|
1895
2043
|
),
|
1896
|
-
(
|
2044
|
+
(
|
2045
|
+
"_status_code",
|
2046
|
+
models.SmallIntegerField(db_index=True, default=None, null=True),
|
2047
|
+
),
|
1897
2048
|
(
|
1898
2049
|
"_logfile",
|
1899
2050
|
lamindb.base.fields.ForeignKey(
|
@@ -1975,7 +2126,7 @@ class Migration(migrations.Migration):
|
|
1975
2126
|
"feature",
|
1976
2127
|
lamindb.base.fields.ForeignKey(
|
1977
2128
|
blank=True,
|
1978
|
-
on_delete=django.db.models.deletion.
|
2129
|
+
on_delete=django.db.models.deletion.PROTECT,
|
1979
2130
|
related_name="links_recordrun",
|
1980
2131
|
to="lamindb.feature",
|
1981
2132
|
),
|
@@ -2000,29 +2151,37 @@ class Migration(migrations.Migration):
|
|
2000
2151
|
),
|
2001
2152
|
],
|
2002
2153
|
options={
|
2003
|
-
"unique_together": {("record", "feature")},
|
2154
|
+
"unique_together": {("record", "feature", "value")},
|
2004
2155
|
},
|
2005
2156
|
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
2006
2157
|
),
|
2007
2158
|
migrations.AddField(
|
2008
2159
|
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",
|
2160
|
+
name="input_of_runs",
|
2161
|
+
field=models.ManyToManyField(
|
2162
|
+
related_name="input_records", to="lamindb.run"
|
2017
2163
|
),
|
2018
2164
|
),
|
2019
2165
|
migrations.AddField(
|
2020
2166
|
model_name="record",
|
2021
|
-
name="
|
2167
|
+
name="linked_runs",
|
2022
2168
|
field=models.ManyToManyField(
|
2023
2169
|
related_name="records", through="lamindb.RecordRun", to="lamindb.run"
|
2024
2170
|
),
|
2025
2171
|
),
|
2172
|
+
migrations.AddField(
|
2173
|
+
model_name="record",
|
2174
|
+
name="run",
|
2175
|
+
field=lamindb.base.fields.ForeignKey(
|
2176
|
+
blank=True,
|
2177
|
+
default=None,
|
2178
|
+
editable=False,
|
2179
|
+
null=True,
|
2180
|
+
on_delete=django.db.models.deletion.PROTECT,
|
2181
|
+
related_name="output_records",
|
2182
|
+
to="lamindb.run",
|
2183
|
+
),
|
2184
|
+
),
|
2026
2185
|
migrations.AddField(
|
2027
2186
|
model_name="project",
|
2028
2187
|
name="run",
|
@@ -2266,9 +2425,6 @@ class Migration(migrations.Migration):
|
|
2266
2425
|
),
|
2267
2426
|
),
|
2268
2427
|
],
|
2269
|
-
options={
|
2270
|
-
"unique_together": {("run", "featurevalue")},
|
2271
|
-
},
|
2272
2428
|
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
2273
2429
|
),
|
2274
2430
|
migrations.AddField(
|
@@ -2323,9 +2479,6 @@ class Migration(migrations.Migration):
|
|
2323
2479
|
),
|
2324
2480
|
),
|
2325
2481
|
],
|
2326
|
-
options={
|
2327
|
-
"unique_together": {("run", "project")},
|
2328
|
-
},
|
2329
2482
|
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
2330
2483
|
),
|
2331
2484
|
migrations.AddField(
|
@@ -2529,6 +2682,17 @@ class Migration(migrations.Migration):
|
|
2529
2682
|
},
|
2530
2683
|
bases=(lamindb.models.can_curate.CanCurate, models.Model),
|
2531
2684
|
),
|
2685
|
+
migrations.AddField(
|
2686
|
+
model_name="record",
|
2687
|
+
name="schema",
|
2688
|
+
field=lamindb.base.fields.ForeignKey(
|
2689
|
+
blank=True,
|
2690
|
+
null=True,
|
2691
|
+
on_delete=django.db.models.deletion.CASCADE,
|
2692
|
+
related_name="records",
|
2693
|
+
to="lamindb.schema",
|
2694
|
+
),
|
2695
|
+
),
|
2532
2696
|
migrations.CreateModel(
|
2533
2697
|
name="ArtifactSchema",
|
2534
2698
|
fields=[
|
@@ -2595,9 +2759,6 @@ class Migration(migrations.Migration):
|
|
2595
2759
|
),
|
2596
2760
|
),
|
2597
2761
|
],
|
2598
|
-
options={
|
2599
|
-
"unique_together": {("artifact", "schema"), ("artifact", "slot")},
|
2600
|
-
},
|
2601
2762
|
bases=(lamindb.models.sqlrecord.IsLink, models.Model),
|
2602
2763
|
),
|
2603
2764
|
migrations.AddField(
|
@@ -2681,12 +2842,6 @@ class Migration(migrations.Migration):
|
|
2681
2842
|
),
|
2682
2843
|
),
|
2683
2844
|
],
|
2684
|
-
options={
|
2685
|
-
"unique_together": {
|
2686
|
-
("composite", "slot"),
|
2687
|
-
("composite", "slot", "component"),
|
2688
|
-
},
|
2689
|
-
},
|
2690
2845
|
bases=(lamindb.models.sqlrecord.IsLink, models.Model),
|
2691
2846
|
),
|
2692
2847
|
migrations.AddField(
|
@@ -2789,9 +2944,6 @@ class Migration(migrations.Migration):
|
|
2789
2944
|
),
|
2790
2945
|
),
|
2791
2946
|
],
|
2792
|
-
options={
|
2793
|
-
"unique_together": {("schema", "project")},
|
2794
|
-
},
|
2795
2947
|
bases=(lamindb.models.sqlrecord.IsLink, models.Model),
|
2796
2948
|
),
|
2797
2949
|
migrations.AddField(
|
@@ -2803,200 +2955,6 @@ class Migration(migrations.Migration):
|
|
2803
2955
|
to="lamindb.schema",
|
2804
2956
|
),
|
2805
2957
|
),
|
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
2958
|
migrations.AddField(
|
3001
2959
|
model_name="schema",
|
3002
2960
|
name="space",
|
@@ -3831,9 +3789,6 @@ class Migration(migrations.Migration):
|
|
3831
3789
|
),
|
3832
3790
|
),
|
3833
3791
|
],
|
3834
|
-
options={
|
3835
|
-
"unique_together": {("run", "ulabel")},
|
3836
|
-
},
|
3837
3792
|
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
3838
3793
|
),
|
3839
3794
|
migrations.AddField(
|
@@ -3851,7 +3806,7 @@ class Migration(migrations.Migration):
|
|
3851
3806
|
"feature",
|
3852
3807
|
lamindb.base.fields.ForeignKey(
|
3853
3808
|
blank=True,
|
3854
|
-
on_delete=django.db.models.deletion.
|
3809
|
+
on_delete=django.db.models.deletion.PROTECT,
|
3855
3810
|
related_name="links_recordulabel",
|
3856
3811
|
to="lamindb.feature",
|
3857
3812
|
),
|
@@ -3876,7 +3831,7 @@ class Migration(migrations.Migration):
|
|
3876
3831
|
),
|
3877
3832
|
],
|
3878
3833
|
options={
|
3879
|
-
"unique_together": {("record", "feature")},
|
3834
|
+
"unique_together": {("record", "feature", "value")},
|
3880
3835
|
},
|
3881
3836
|
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
3882
3837
|
),
|
@@ -3966,9 +3921,6 @@ class Migration(migrations.Migration):
|
|
3966
3921
|
),
|
3967
3922
|
),
|
3968
3923
|
],
|
3969
|
-
options={
|
3970
|
-
"unique_together": {("collection", "ulabel")},
|
3971
|
-
},
|
3972
3924
|
bases=(lamindb.models.sqlrecord.IsLink, models.Model),
|
3973
3925
|
),
|
3974
3926
|
migrations.AddField(
|
@@ -4057,9 +4009,6 @@ class Migration(migrations.Migration):
|
|
4057
4009
|
),
|
4058
4010
|
),
|
4059
4011
|
],
|
4060
|
-
options={
|
4061
|
-
"unique_together": {("artifact", "ulabel", "feature")},
|
4062
|
-
},
|
4063
4012
|
bases=(lamindb.models.sqlrecord.IsLink, models.Model),
|
4064
4013
|
),
|
4065
4014
|
migrations.AddField(
|
@@ -4389,6 +4338,10 @@ class Migration(migrations.Migration):
|
|
4389
4338
|
to="lamindb.user",
|
4390
4339
|
),
|
4391
4340
|
),
|
4341
|
+
migrations.AlterUniqueTogether(
|
4342
|
+
name="artifactrecord",
|
4343
|
+
unique_together={("artifact", "record", "feature")},
|
4344
|
+
),
|
4392
4345
|
migrations.CreateModel(
|
4393
4346
|
name="RecordJson",
|
4394
4347
|
fields=[
|
@@ -4403,7 +4356,7 @@ class Migration(migrations.Migration):
|
|
4403
4356
|
"feature",
|
4404
4357
|
lamindb.base.fields.ForeignKey(
|
4405
4358
|
blank=True,
|
4406
|
-
on_delete=django.db.models.deletion.
|
4359
|
+
on_delete=django.db.models.deletion.PROTECT,
|
4407
4360
|
related_name="links_recordjson",
|
4408
4361
|
to="lamindb.feature",
|
4409
4362
|
),
|
@@ -4423,10 +4376,41 @@ class Migration(migrations.Migration):
|
|
4423
4376
|
},
|
4424
4377
|
bases=(models.Model, lamindb.models.sqlrecord.IsLink),
|
4425
4378
|
),
|
4379
|
+
migrations.AlterUniqueTogether(
|
4380
|
+
name="recordreference",
|
4381
|
+
unique_together={("record", "feature", "value")},
|
4382
|
+
),
|
4426
4383
|
migrations.AlterUniqueTogether(
|
4427
4384
|
name="transform",
|
4428
4385
|
unique_together={("key", "hash")},
|
4429
4386
|
),
|
4387
|
+
migrations.AddConstraint(
|
4388
|
+
model_name="space",
|
4389
|
+
constraint=models.UniqueConstraint(
|
4390
|
+
django.db.models.functions.text.Lower("name"),
|
4391
|
+
name="unique_space_name_lower",
|
4392
|
+
),
|
4393
|
+
),
|
4394
|
+
migrations.AlterUniqueTogether(
|
4395
|
+
name="schemaproject",
|
4396
|
+
unique_together={("schema", "project")},
|
4397
|
+
),
|
4398
|
+
migrations.AlterUniqueTogether(
|
4399
|
+
name="schemacomponent",
|
4400
|
+
unique_together={("composite", "slot"), ("composite", "slot", "component")},
|
4401
|
+
),
|
4402
|
+
migrations.AlterUniqueTogether(
|
4403
|
+
name="runulabel",
|
4404
|
+
unique_together={("run", "ulabel")},
|
4405
|
+
),
|
4406
|
+
migrations.AlterUniqueTogether(
|
4407
|
+
name="runproject",
|
4408
|
+
unique_together={("run", "project")},
|
4409
|
+
),
|
4410
|
+
migrations.AlterUniqueTogether(
|
4411
|
+
name="runfeaturevalue",
|
4412
|
+
unique_together={("run", "featurevalue")},
|
4413
|
+
),
|
4430
4414
|
migrations.AlterUniqueTogether(
|
4431
4415
|
name="personproject",
|
4432
4416
|
unique_together={("person", "project")},
|
@@ -4439,6 +4423,10 @@ class Migration(migrations.Migration):
|
|
4439
4423
|
name="featureproject",
|
4440
4424
|
unique_together={("feature", "project")},
|
4441
4425
|
),
|
4426
|
+
migrations.AlterUniqueTogether(
|
4427
|
+
name="collectionulabel",
|
4428
|
+
unique_together={("collection", "ulabel")},
|
4429
|
+
),
|
4442
4430
|
migrations.AlterUniqueTogether(
|
4443
4431
|
name="collectionreference",
|
4444
4432
|
unique_together={("collection", "reference")},
|
@@ -4451,6 +4439,21 @@ class Migration(migrations.Migration):
|
|
4451
4439
|
name="collectionartifact",
|
4452
4440
|
unique_together={("collection", "artifact")},
|
4453
4441
|
),
|
4442
|
+
migrations.AddConstraint(
|
4443
|
+
model_name="branch",
|
4444
|
+
constraint=models.UniqueConstraint(
|
4445
|
+
django.db.models.functions.text.Lower("name"),
|
4446
|
+
name="unique_branch_name_lower",
|
4447
|
+
),
|
4448
|
+
),
|
4449
|
+
migrations.AlterUniqueTogether(
|
4450
|
+
name="artifactulabel",
|
4451
|
+
unique_together={("artifact", "ulabel", "feature")},
|
4452
|
+
),
|
4453
|
+
migrations.AlterUniqueTogether(
|
4454
|
+
name="artifactschema",
|
4455
|
+
unique_together={("artifact", "schema"), ("artifact", "slot")},
|
4456
|
+
),
|
4454
4457
|
migrations.AlterUniqueTogether(
|
4455
4458
|
name="artifactreference",
|
4456
4459
|
unique_together={("artifact", "reference", "feature")},
|