Using your existing Pixel Painter project, we're going to upgrade it to use Express (if it isn't already).
In addition, intialize the project with sequelize
, to create the folders: config
, migrations
, and models
.
Now that we know a little bit about creating migrations, let's use Sequelize to create a couple migration files.
- Using
sequelize model:create
to create model and migration files for aDrawing
table. - The only requirement for the
Drawing
table is that it must have adata
column, with the data typejson
. - After creating your migration files, create a
seed
folder and create a script to add atleast one drawing to your database! (remember to run migrations) before you seed your database.