···11+-- Add slice_uri column to actor table to associate actors with specific slices
22+ALTER TABLE "actor" ADD COLUMN "slice_uri" TEXT;
33+44+-- Create a new primary key that includes both did and slice_uri
55+-- First drop the existing primary key
66+ALTER TABLE "actor" DROP CONSTRAINT "actor_pkey";
77+88+-- Add the new composite primary key
99+ALTER TABLE "actor" ADD PRIMARY KEY ("did", "slice_uri");
1010+1111+-- Create new indexes for slice-based queries
1212+CREATE INDEX IF NOT EXISTS idx_actor_slice_uri ON "actor"("slice_uri");
1313+CREATE INDEX IF NOT EXISTS idx_actor_slice_handle ON "actor"("slice_uri", "handle");
1414+CREATE INDEX IF NOT EXISTS idx_actor_slice_indexed_at ON "actor"("slice_uri", "indexedAt");
1515+1616+-- Update existing records to have a default slice_uri (if any exist)
1717+-- This will need to be handled manually or with a data migration
1818+-- For now, we'll leave existing records as-is since they'll have NULL slice_uri
···7373 name="external_collections"
7474 rows={4}
7575 className="block w-full border border-gray-300 rounded-md px-3 py-2"
7676- placeholder="Add external collections not in your slice lexicons:
7777-7878-app.bsky.feed.post
7979-app.bsky.actor.profile
8080-com.atproto.repo.strongRef"
7676+ placeholder="Add external collections e.g. app.bsky.actor.profile to sync collections not in your domain"
8177 />
8282- <p className="text-xs text-gray-500 mt-1">
8383- These collections will be synced even if they're not defined in your slice lexicons
8484- </p>
8578 </div>
86798780 <div>
···122115 </div>
123116124117 {/* Job History */}
125125- <div
118118+ <div
126119 hx-get={`/api/slices/${sliceId}/job-history`}
127120 hx-trigger="load, every 10s"
128121 hx-swap="innerHTML"
···137130 </h3>
138131 <ul className="text-blue-700 space-y-1 text-sm">
139132 <li>
140140- • Collections from your slice lexicons are automatically loaded above
133133+ • Collections from your slice lexicons are automatically loaded
134134+ above
141135 </li>
142136 <li>
143137 • Use External Collections to sync popular collections like{" "}