Skip to content

[Phase 2] Flip driver manifest to editing-ready (closes Phase 2) #149

@debba

Description

@debba

[Phase 2] Flip driver manifest to editing-ready (closes Phase 2)

Part of the SQL Server Phase 2 epic #150. Blocked by #ISSUE_1, #ISSUE_2, #ISSUE_3, #ISSUE_4, #ISSUE_5 — should be the last PR of Phase 2.

The driver isn't on main. Code lives on feat/sql-server and isn't in any release. This PR is the close-out — once it lands on feat/sql-server, the whole branch squashes into main.

Once all the backend + frontend Phase 2 work has landed, this PR re-enables editing in the UI by flipping capability flags in the driver manifest. Should be a tiny diff + a thorough manual QA pass.

Task

Backend

In src-tauri/src/drivers/sqlserver/mod.rs::SqlServerDriver::new:

DriverCapabilities {
    // ...
    alter_column: false,        // keep false — DDL generation is Phase 3
    create_foreign_keys: false, // keep false — DDL generation is Phase 3
    manage_tables: true,        // was false  ← change
    readonly: false,            // was true   ← change
}

Bump the driver version:

version: "0.2.0".to_string(),  // was "0.1.0"
description: "Microsoft SQL Server".to_string(),  // drop "(read-only preview)"

Frontend

Mirror the same changes in src/hooks/useDrivers.tsFALLBACK_DRIVERS entry for sqlserver.

Integration test (gated)

Add one gated integration test under src-tauri/src/drivers/sqlserver/tests.rs (or a new tests/sqlserver_integration.rs) that exercises the full editing loop:

  1. Start mcr.microsoft.com/mssql/server:2022-latest via testcontainers
  2. CREATE TABLE with single PK + composite PK + one table with an IDENTITY column
  3. Insert rows, update one column per row, delete one row — for each table shape
  4. Assert row counts match expectations
  5. Gate with #[ignore] so CI without Docker skips it

Manual QA checklist

  • INSERT / UPDATE / DELETE via UI on a table with single PK
  • Same on a table with composite PK
  • IDENTITY_INSERT table: insert with and without identity value set
  • TLS on / off / strict (local server + Azure SQL)
  • Regression check: MySQL / Postgres / SQLite editable flows behave exactly as before the PR

Reference

  • Plan: docs/sql-server-implementation-plan.md § Phase 2 — closing

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededsql-serverSQL Server driver

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions