Closed nikolasburk closed 5 years ago
[ ] The CLI outputs should consistently uses colors when they reference:
properties from prisma.yml
file names
other code references (URLs, ...)
❯ Demo server + MySQL database Free demo environment hosted in Prisma Cloud
docker-compose.yml
from running prisma init
should have an additional commented line with an explanatory comment on the database container configuration that maps the port, e.g. for Postgres:version: '3'
services:
prisma:
image: prismagraphql/prisma:1.30-alpha
restart: always
ports:
- "4466:4466"
environment:
PRISMA_CONFIG: |
port: 4466
# Uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
# managementApiSecret: my-secret
prototype: true
databases:
default:
connector: postgres
host: postgres
user: prisma
password: prisma
port: 5432
postgres:
image: postgres
restart: always
# Uncomment the next line to connect to your your database from outside the Docker environment, e.g. using a database GUI like Postico
# ports:
# - "5432:5432"
environment:
POSTGRES_USER: prisma
POSTGRES_PASSWORD: prisma
volumes:
- postgres:/var/lib/postgresql/data
volumes:
postgres:
Note that Uncomment
should be uppercased in both comments.
prisma deploy
, the CLI prints: Your Prisma GraphQL database endpoint is live:
. It should just print: Your Prisma endpoint is live:
prisma import
and prisma export
Context: Both commands will not be further developed in the future. For large data sets, it is recommended to use native import/export features of the underlying database.
When running the prisma import
or prisma export
command, the CLI should print the following warning (after the warning was printed, the command should be executed as usual):
This is for prisma import
with MySQL:
Warning: The `prisma import` command will not be further developed in the future. Please use the native import features of your database for these workflows.
More info here: https://dev.mysql.com/doc/refman/5.7/en/mysqlimport.html
This is for prisma export
with MySQL:
Warning: The `prisma export` command will not be further developed in the future. Please use the native export features of your database for these workflows.
More info here: https://dev.mysql.com/doc/refman/5.7/en/mysqlpump.html
The links vary other database connectors:
The generated docker-compose.yml from running prisma init should have an additional commented line
Adding specific ports/client names for this per DB. This is the related code:
const databaseServiceDefinitions = {
postgres: `
postgres:
image: postgres
restart: always
# Uncomment the next line to connect to your your database from outside the Docker environment, e.g. using a database GUI like Postico
# ports:
# - "5432:5432"
environment:
POSTGRES_USER: prisma
POSTGRES_PASSWORD: prisma
volumes:
- postgres:/var/lib/postgresql/data
volumes:
postgres:
`,
mysql: `
mysql:
image: mysql:5.7
restart: always
# Uncomment the next line to connect to your your database from outside the Docker environment, e.g. using a database GUI like Workbench
# ports:
# - "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: prisma
volumes:
- mysql:/var/lib/mysql
volumes:
mysql:
`,
mongo: `
mongo:
image: mongo:3.6
restart: always
# Uncomment the next line to connect to your your database from outside the Docker environment, e.g. using a database GUI like Compass
# ports:
# - "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: prisma
MONGO_INITDB_ROOT_PASSWORD: prisma
ports:
- "27017:27017"
volumes:
- mongo:/var/lib/mongo
volumes:
mongo:`,
}
All of the feedback here is implemented and is available in stable now.
- [x] Warning for
prisma import
andprisma export
Context: Both commands will not be further developed in the future. For large data sets, it is recommended to use native import/export features of the underlying database.
When running the
prisma import
orprisma export
command, the CLI should print the following warning (after the warning was printed, the command should be executed as usual):This is for
prisma import
with MySQL:Warning: The `prisma import` command will not be further developed in the future. Please use the native import features of your database for these workflows. More info here: https://dev.mysql.com/doc/refman/5.7/en/mysqlimport.html
This is for
prisma export
with MySQL:Warning: The `prisma export` command will not be further developed in the future. Please use the native export features of your database for these workflows. More info here: https://dev.mysql.com/doc/refman/5.7/en/mysqlpump.html
The links vary other database connectors:
Please, do not remove import/export comand. It's powerfull tool. With this i managed upgrade old prisma-1.15 to latest prisma-1.30 With native mysqldump + mysqlimport i can not do this cause tables different (became 75 instead 202 after upgrade :))
The CLI wording can be improved.
prisma
command printsGraphQL Database Gateway
as a description for Prisma. Instead it should printPrisma replaces traditional ORMs