dolthub / dolthub/dolt

Feature Request: Ability to Commit only Schema Changes

Open
#6,853 2 comments 0 reactions 0 assignees View on GitHub
customer issue enhancement version control
Dominant language
Go
Stars
24.4k
Forks
873
Avg merge
1d 5h
Merged PRs (30d)
108

Description

# Challenge

In software development, it's common for software developers to run a local copy of their databases on their personal machines they can test out schema changes against, to validate the migrations apply successfully and dont brick any existing data.

It's quite common for these local databases to have completely different "test" and/or "sanitized" data on them.

The common workflow is for Developers to test out new schema changes, typically via a Migration script of some form, on their test data, and once satisfied with it they check that migration script in and run it against Dev/Qa/UAT/Prod/Etc, pushing their schema changes live.

Currently, Dolt does not appear to support the ability to distinguish between the Data that has been added to the database (new rows, new columns added to rows, etc), vs the Schema that has been mutated (adding a new column, adding a new table, adding a new FK, adding a new index, etc)

It would be quite useful for a developer to be able to have a flag they can use on `dolt add` that allows them to only check in their changes to the Schema, while completely ignoring any new data added to their database.

# Solution

Add the new flag `--schema` to the command `dolt add`

# Expected behavior

`dolt add --schema` will behave almost the same as normal `dolt add`, but as if the current database has zero rows on all tables, that way no data is checked in and *only* schema updates are checked in.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.