JS Blog Software development, entertainment, lifestyle.

TagNode.js

Creating database migrations and seeds in Node.js

C

This can be all done with knex library, a SQL query builder for JavaScript. In this post I’ll use MySQL (MariaDB) database, but knex also supports Postgres, MSSQL, SQLite3, and Oracle. I will also use faker for generating fake data for seeding the database. Install knex, faker and mysql (or any other driver for database which knex supports). npm install knex faker mysql Create a new...

JS Blog Software development, entertainment, lifestyle.

About me

Jernej Sila portrait
Hi, I'm Jernej, a software engineer from Slovenia. Welcome to my personal blog. For more about me, my work and hobbies, please visit my profile page.

Categories

Archives