Skip to content

SQLite migration from 1.4.17 produces a different schema than a fresh 1.17.18 database #36709

Closed as not planned

Description

@magronxo

Description

I reproduced a schema mismatch when upgrading an empty temporary profile from opencode-ai 1.4.17 to 1.17.18.

The migration completed, but the resulting SQLite schema did not match a separate database created fresh with 1.17.18. I compared normalized schemas with migration-journal contents excluded.

The upgrade path also drops session_entry and replaces the old permission.data representation. No production database was used, so I am not claiming that user data was lost. The concrete problem is that two databases running the same OpenCode version end up with different schemas depending on whether they were created fresh or upgraded.

Is this divergence expected? If not, is a convergence migration missing?

Plugins

Not used.

OpenCode version

1.4.17 → 1.17.18

Steps to reproduce

  1. Create a fresh empty profile with 1.4.17.
  2. Copy that profile and start 1.17.18 against the copy.
  3. Create another fresh profile directly with 1.17.18.
  4. Compare the normalized SQLite schemas, excluding migration-journal contents.
  5. Observe that the upgraded and fresh schemas differ.

Screenshot and/or share link

None.

Operating System

Linux x86-64

Terminal

Non-interactive isolated test.

Activity

  1. changed the title [-]Clarification requested: supported upgrade path and SQLite migrations from opencode-ai 1.4.17 to 1.17.18[/-] [+]SQLite migration from 1.4.17 produces a different schema than a fresh 1.17.18 database[/+] on Jul 13, 2026
  2. github-actions commented on Jul 13, 2026

    @github-actions
    Contributor

    Thanks for updating the issue! The report is clear and well-structured now. We'll take a look at the schema divergence between migrated and fresh databases.

  3. github-actions commented on Sep 12, 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.

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