hasura / hasura/graphql-engine

MSSql Migration support

Open
#8,181 1 comment 4 reactions 0 assignees View on GitHub
c/cli c/migrations c/server k/enhancement t/product-platform
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

Hasura/cli version: 2.2.0

### Discussed in https://github.com/hasura/graphql-engine/discussions/8180

Originally posted by **chrisknu** February 15, 2022
Hi there,

I'm accustomed to migrations being generated with table/schema changes via a local hasura console (postgres).

When attempting to set up migrations with a local instance of hasura/MSSQL, I'm running into this error:

hasura migrate create "init" --from-server --database-name
FATA[0000] cannot fetch schema dump: schema dump for source of kind mssql is not supported

I can get the metadata to export and apply just fine, but migrations seem to be failing. Any help is welcome.

Update: Found the [line ](https://github.com/chrisknu/graphql-engine/blob/582d78110fb8b7e1e30936bcc6ebc3cdbad59d39/cli/migrate/database/hasuradb/schema_dump.go#L12)in the CLI project that denotes only Postgres is supported at the moment.

It would be nice to have 1:1 feature parity with Postgres

Contributor guide

Open the contributing guide

Research direction

Start with cli/migrate/database/hasuradb/schema_dump.go, especially the line linked in the issue, and reproduce the `hasura migrate create "init" --from-server --database-name ` command against MSSQL. Trace how schema dumps are handled for the supported database kind. Done means MSSQL migrations can generate schema dumps with parity to the existing PostgreSQL flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
cli, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.