Import Demo Data
This guide will help you import demo data into your Neon PostgreSQL database using Prisma. The demo data helps you get started with CozyCommerce.
Prerequisites
Before importing the demo data, make sure you have:
- Set up your Neon PostgreSQL database
- Configured your
.env
file with theDATABASE_URL
- Installed all project dependencies
Installation
First, install the required dependencies:
npm install @prisma/client
npm install prisma --save-dev
Database Setup
- Initialize Prisma in your project (if not already done):
npx prisma init
- Generate the Prisma client:
npx prisma generate
- Create and apply the database migrations:
npx prisma migrate dev
Importing Demo Data
We've provided a script to import demo data into your database.
To run the import script:
npm run import-demo-data
⚠️
Warning: This script will delete all existing data in your database before importing the demo data. Make sure to backup your data if needed.