Skip to content

feat(db): add SQLite migration SQL generation #460

Closed as not planned
Closed as not planned

Description

@GaspardKirira

Summary

Add SQLite SQL generation for schema migration operations.

The migration CLI already accepts --dialect sqlite, but migration generation currently supports only MySQL.

Current behavior

The schema diff engine produces portable migration operations.

Only MySqlGenerator converts those operations into SQL.

Requesting SQLite migration generation results in an error.

Expected behavior

The DB module must generate valid SQLite up and down migration scripts for all operations currently supported by the schema diff engine.

SQLite limitations must be handled explicitly.

Scope

  • Add a SQLite SQL generator.
  • Generate table creation SQL.
  • Generate table removal SQL.
  • Generate column addition SQL.
  • Handle column removal according to supported SQLite versions.
  • Generate normal and unique indexes.
  • Generate down migrations.
  • Quote SQLite identifiers safely.
  • Connect --dialect sqlite to the generator.
  • Add golden tests.
  • Preserve existing schema and migration APIs.

Suggested files

  • modules/db/include/vix/db/mig/sql/SQLiteGenerator.hpp
  • modules/db/src/mig/sql/SQLiteGenerator.cpp
  • modules/db/tools/migrator/MakeMigrations.cpp
  • modules/db/tests/sqlite_generator_test.cpp
  • modules/db/CMakeLists.txt

Acceptance criteria

  • --dialect sqlite generates migration files.
  • All currently portable schema types map to valid SQLite types.
  • Index creation and removal are supported.
  • Unsupported operations fail with clear diagnostics.
  • Generated up and down SQL is deterministic.
  • Generated migrations execute successfully against SQLite.
  • MySQL generation remains unchanged.
  • Existing public APIs remain compatible.

Non-goals

This issue does not include:

  • PostgreSQL generation;
  • full table-rebuild automation for every SQLite alteration;
  • ORM migrations;
  • database introspection.

Suggested labels

  • scope:db
  • type:feature
  • tests
  • help wanted
  • status:accepted

Activity

  1. GaspardKirira commented on Oct 30, 2026

    @GaspardKirira
    MemberAuthor

    Closing this issue as not planned as part of the gradual Vix2 legacy backlog cleanup.

    This issue concerns the former vix::db module and its Vix2 implementation/API. Vix2 is no longer being actively developed. The upcoming Vix3 generation is being built with a deliberately limited scope, and the legacy DB module and its backlog are not carried forward as Vix3 commitments.

    This closure does not mean the reported issue was fixed or implemented. The original report and discussion remain available for historical reference, including for those still using Vix2.

    Thank you for documenting the problem.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededscope:dbDatabase driversstatus:acceptedApproved, plannedtestsTests, CI coverage and validationtype:featureNew functionality

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions