b53a97d26633a1f174a7031559a69d37e393379f
chmalee
  Fri May 1 14:19:19 2026 -0700
Allow myVariants tracks to be shared similar to google docs, read only and read+edit access by username or for all. Last write wins. Currently no history of changes, leaving that for the next version of the feature

diff --git src/hg/lib/myVariantsShare.sql src/hg/lib/myVariantsShare.sql
new file mode 100644
index 00000000000..506278fa8d2
--- /dev/null
+++ src/hg/lib/myVariantsShare.sql
@@ -0,0 +1,22 @@
+# myVariantsShare.sql was originally generated by the autoSql program, which also
+# generated myVariantsShare.c and myVariantsShare.h.  This creates the database representation of
+# an object which can be loaded and saved from RAM in a fairly
+# automatic way.
+
+#A share record linking an owner's myVariants project to a recipient.
+CREATE TABLE myVariantsShares (
+    id int unsigned not null AUTO_INCREMENT,	# Auto-increment primary key
+    ownerUser varchar(255) not null,	# Owner who created the share
+    shareToken varchar(64) not null,	# 48-char URL-safe token
+    project varchar(255) not null,	# Project name, or * for all
+    db varchar(255) not null,	# Assembly (hg38, mm39, etc.)
+    permission tinyint unsigned not null default 0,	# 0=read-only, 1=read-write
+    targetUser varchar(255) default null,	# Specific user, or NULL for anyone with link
+    label varchar(255) default null,	# Optional human-readable label
+    createdAt timestamp not null default CURRENT_TIMESTAMP,	# Timestamp of creation
+              #Indices
+    PRIMARY KEY(id),
+    UNIQUE KEY(shareToken),
+    KEY(ownerUser),
+    KEY(targetUser)
+);