Skip to content

refactor(core): remove legacy account runtime schemas - #41173

Merged
kitlangton merged 2 commits into
v2from
remove-legacy-accounts
Aug 8, 2026
Merged

refactor(core): remove legacy account runtime schemas#41173
kitlangton merged 2 commits into
v2from
remove-legacy-accounts

Conversation

@kitlangton

@kitlangton kitlangton commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

What

Remove the dead Core Account runtime schemas while preserving the legacy SQLite account tables and all existing data. Current V2 authentication uses the Credential and Integration modules; no runtime code consumes the old Account login, polling, organization, token, or error schemas.

Before / After

Before: packages/core/src/account.ts exported 101 lines of unused runtime schemas. The legacy Drizzle table declarations depended on four branded types from that otherwise dead module.

After: The unused runtime module is gone. account, account_state, and control_account remain unchanged in the canonical schema and in existing databases; their declarations use ordinary SQLite string types instead of importing the deleted runtime namespace.

How

  • Delete packages/core/src/account.ts.
  • Keep packages/core/src/account/sql.ts as the legacy schema owner.
  • Remove only TypeScript $type annotations that depended on the deleted Account namespace; these annotations do not alter SQLite schema generation.
  • Confirm migration generation reports no schema changes.

Scope

  • No tables, columns, rows, credentials, migrations, or generated schema artifacts are changed.
  • This does not touch the unrelated Console Account schema or provider-specific account IDs.
  • Removing the physical legacy tables can be considered separately later.

Testing

  • bun run migration --check from packages/core: passed; no schema changes or migration generated.
  • bun run test test/database-migration.test.ts test/credential.test.ts from packages/core: 9 passed, 0 failed.
  • bun typecheck from packages/core: passed.
  • Push hook bun turbo typecheck --concurrency=3: 33 tasks passed.

@kitlangton kitlangton changed the title refactor(core): remove legacy account subsystem refactor(core): remove legacy account runtime schemas Aug 8, 2026
@kitlangton
kitlangton merged commit aa05fd2 into v2 Aug 8, 2026
8 of 10 checks passed
@kitlangton
kitlangton deleted the remove-legacy-accounts branch August 8, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant