prisma / migrate

Issues for Prisma Migrate are now tracked at prisma/prisma. This repo was used to track issues for Prisma Migrate Experimental and is now deprecated.
https://www.prisma.io/docs/concepts/components/prisma-migrate
Apache License 2.0
766 stars 22 forks source link

`--help` does not need `--experimental` for main `migrate`, does for `migrate save` #317

Closed janpio closed 4 years ago

janpio commented 4 years ago
C:\Users\Jan\Documents                                            
λ prisma2 migrate --help                                          

�️ ‍‍‍  Migrate your database with confidence                     

Usage                                                             

  prisma2 migrate [command] [options] --experimental              

Options                                                           

  -h, --help   Display this help message                          

Commands                                                          

    save   Create a new migration                                 
    docs   Open documentation in the browser                      
    down   Migrate your database down                             
      up   Migrate your database up                               

Examples                                                          

  Create new migration                                            
  $ prisma2 migrate save --experimental                           

  Migrate up to the latest datamodel                              
  $ prisma2 migrate up --experimental                             

  Preview the next migration without migrating                    
  $ prisma2 migrate up --preview --experimental                   

  Rollback a migration                                            
  $ prisma2 migrate down 1 --experimental                         

  Get more help on a migrate up                                   
  $ prisma2 migrate up -h --experimental                          

C:\Users\Jan\Documents                                            
λ prisma2 migrate save --help                                     
Error: Please provide the --experimental flag to use this command.

C:\Users\Jan\Documents
λ prisma2 migrate save --help --experimental

Save a migration

Usage

  prisma migrate save [options] --experimental

Options

  -h, --help       Displays this help message
  -n, --name       Name the migration
  -c, --create-db  Create the database in case it doesn't exist
  -p, --preview    Get a preview of which migration would be created next

Examples

  Create a new migration
  $ prisma migrate save --experimental

  Create a new migration by name
  $ prisma migrate save --name "add unique to email" --experimental
janpio commented 4 years ago

Also applies to studio:

C:\Users\Jan\Documents
λ prisma2 studio --help
Error: Please provide the --experimental flag to use this command.

C:\Users\Jan\Documents
λ prisma2 studio --help --experimental

Browse your data with Studio

Usage

[...]
Jolg42 commented 4 years ago

@janpio I changed the behavior to not require --experimental for --help, will be in alpha in a few minutes!

janpio commented 4 years ago

Ah, I was expecting us to change it the other way - to require it.

Maybe the help output itself should mention that it is experimental and very dangerous and needs --experimental to run? Like a banner with a border and ⚠️ or something?

Jolg42 commented 4 years ago

Haha, I was confused with your examples between Migrate and Studio :)

It feels more natural to no require --experimental for --help in my opinion.

And yes maybe a warning would be the best!

janpio commented 4 years ago

I am fine with no --experimental for help.

Can you create a new issue for the other things?

  1. Help output should include information that --experimental is required
  2. Add a big fat warning to all the output, possibly backed by a docs page that explains what our experimental stuff means (by @nikolasburk)

Both can possibly be combined.

Jolg42 commented 4 years ago

@janpio Created one issue for both here https://github.com/prisma/prisma2/issues/1547 ;-)