- Create a database
- Set your database connection configuration inside the
.env
file - Write your SQL statement inside the
/create
folder under the/migrations
folder - Give the preceding number based on the tables relation
- Finally run the command
npm run migrate
for migration,npm run drop
to drop.
"dependencies": {
"express": "^4.18.2",
"mysql": "^2.18.1"
},
"devDependencies": {
"dotenv": "^16.1.4"
}