Skip to content

Failed to run the query 'CREATE TABLE account #17270

Closed as not planned
Closed as not planned

Description

@avarayr

Description

❯ opencode
Error: Unexpected error, check log file at /Users/....../.local/share/opencode/log/2026-03-13T013757.log for more details

Failed to run the query 'CREATE TABLE `account` (
        `id` text PRIMARY KEY,
        `email` text NOT NULL,
        `url` text NOT NULL,
        `access_token` text NOT NULL,
        `refresh_token` text NOT NULL,
        `token_expiry` integer,
        `selected_org_id` text,
        `time_created` integer NOT NULL,
        `time_updated` integer NOT NULL
);

happened after upgrade to 1.2.25

Root cause: In commit a44f78c34, two migrations were deleted and consolidated:

  • 20260228185036_shocking_namor (ALTER TABLE control_account RENAME TO account)
  • 20260228192110_account_id (restructured account table with id PK)

These were replaced by a single new migration 20260228203230_blue_harpoon that does a fresh CREATE TABLE account.

Plugins

No response

OpenCode version

1.2.25

Steps to reproduce

update to opencode 1.2.25 from 1.1.24

Screenshot and/or share link

No response

Operating System

macos 26.3

Terminal

Ghostty

Activity

  1. avarayr commented on Mar 13, 2026

    @avarayr
    Author

    macos/linux quick fix

    sqlite3 ~/.local/share/opencode/opencode.db "DROP TABLE IF EXISTS account;"
  2. changed the title [-]`Failed to run the query 'CREATE TABLE `account``[/-] [+]`Failed to run the query 'CREATE TABLE \`account\``[/+] on Mar 13, 2026
  3. changed the title [-]`Failed to run the query 'CREATE TABLE \`account\``[/-] [+]Failed to run the query 'CREATE TABLE `account`[/+] on Mar 13, 2026
  4. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 13, 2026
  5. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  6. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  7. bennyen commented on Jul 23, 2026

    @bennyen

    experienced this in 1.18.4. The work around was not effective. I had to clean the db.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions