prisma / prisma/orm

Improve interop between windows <-> linux mariadb development workflow

Open
#6,972 7 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

topic: mariadb topic: migrate topic: mysql topic: windows
Dominant language
TypeScript
Stars
47.6k
Forks
2.5k
Avg merge
21h 59m
Merged PRs (30d)
95

Description

Problem

This issue is outcome of discussion in https://github.com/prisma/prisma/issues/6962

Right now when you create migrations in Windows Maria db, migrate tends to lowercase certain statements like ALTER TABLE. Either this is a bug or we should improve the user experience here. When user tries to deploy this migration to their linux production environment, it will fail.

Suggested solution

  • Generate migrations with same case on every system.
  • Add a flag in migrations.toml that migration was generated on windows and using lowercase names and somehow fix those when migrating the same db engine on linux.

Alternatives

Warn the user about this quirk and ask them to use docker/wsl/hosted mariadb instance.

Additional context

https://github.com/prisma/prisma/issues/6962

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the discussion in issue 6962 first, then inspect how migrations and migrations.toml represent generated migrations across Windows and Linux. Compare MariaDB migration output between the two systems; done means migrations preserve consistent statement casing or clearly handle Windows-generated lowercase names when deployed on Linux, with the behavior documented or warned about.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, mariadb
Domain
databases, operating-systems
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.