← ClaudeAtlas

link-setup-databaselisted

Create the linked_accounts database table required for Merge Link. Use as Step 2 of Merge Link implementation after loading context.
merge-api/merge-unified-skills · ★ 0 · Data & Documents · score 71
Install: claude install-skill merge-api/merge-unified-skills
# Setup Database: linked_accounts Table Creates the database table that tracks linked Merge accounts — one row per active integration per organization. All Merge Link API flows read and write this table. ## Prerequisites Tech stack and ORM identified (either from Step 1 of `implementing-link`, or by scanning the codebase now). ## Before Proceeding **Step 1 — Confirm or gather required context:** Two pieces of information are needed before showing the schema: - **Organization/tenant table**: The table or model in your app that represents a customer org or tenant (e.g. `organizations`, `companies`, `tenants`). Needed to wire the `organization_id` FK. - **Linked Account strategy**: Strategy 1 (1 Linked Account per category per org) or Strategy 2 (multiple per category)? Needed to annotate `end_user_origin_id`. If invoked from `implementing-link`, both were answered in Steps 1b and 1d — use that context. Otherwise, ask the user now: > 1. What is the table/model that represents a customer organization or tenant in your system? What is its primary key column? > 2. Do you want 1 Linked Account per category per org, or multiple Linked Accounts per category? **Step 2 — Show the schema and wait for confirmation:** > Here is the `linked_accounts` table I'll create: > > | Column | Type | Constraints | Notes | > |--------|------|-------------|-------| > | `id` | integer | PRIMARY KEY, auto-increment | | > | `organization_id` | integer | NOT NULL, FK → `{org_table}.{pk}` | Ties