@amplication/plugin-db-mysql v1.1.11
@amplication/plugin-db-mysql
Use a MySQL database in the service generated by Amplication.
Purpose
This plugin adds the required code to use MySQL database in the service generated by Amplication. It updateds the following parts:
- Updates the datasource on the
schema.prismafile:- For versions older than
1.3.3the datesource name is based on the database type- mySQL - the datasource name is
mysql
- mySQL - the datasource name is
- From version
1.3.3the datasource name isdb, no matter what is the database type
- For versions older than
- From version
1.3.3as the datasouce name isdb, all the custom attributes that use the@{datasource.name}.{nameOfTheAttribute}are replaced with@db.{nameOfTheAttribute} - Adds the requires services and varables to
docker-compose.yml - Add the
dbservice to thedocker-compose.dev.yml - Add the requires environment variables to
.env
Configuration
The plugin uses the parameters configured on the database tab on the service settings page

Usage
This plugin integrates with the all default tasks and scripts used by the generated service:
"seed": "ts-node scripts/seed.ts",
"db:migrate-save": "prisma migrate dev",
"db:migrate-up": "prisma migrate deploy",
"db:clean": "ts-node scripts/clean.ts",
"db:init": "run-s \"db:migrate-save -- --name 'initial version'\" db:migrate-up seed",
"prisma:generate": "prisma generate",
"docker:db": "docker-compose -f docker-compose.db.yml up -d",
"docker:build": "docker build .",
"compose:up": "docker-compose up -d",
"compose:down": "docker-compose down --volumes"2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago