Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nexus-prisma

Package Overview
Dependencies
Maintainers
1
Versions
225
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nexus-prisma

## Getting started

  • 0.0.1-beta.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.2K
decreased by-19.64%
Maintainers
1
Weekly downloads
 
Created
Source

nexus-prisma

Getting started

1. Clone the repo

Clone this repository:

git clone https://github.com/Weakky/photogen.git
cd example
2. Install dependencies

Install Node depencies:

npm install

Note that the Photon & Photogen generation are included in an install script in your package.json, which means Photon also gets (re-)generated upon each npm install.

3. Migrate the database

With Prisma 2, database migrations are performed using the lift subcommand of the Prisma CLI, i.e. prisma2 lift <command>.

3.1. Create migration

Run the following command to create a new migration:

prisma2 lift create --name 'init'

This creates a new directory called migrations. This directory stores detailed info about each migration you perform throughout the lifetime of your project.

Every migration is represented via its own directory inside the migrations directory. In this case, your first migration is called TIMESTAMP-init (e.g. 20190605165416-init). It contains tree files:

  • datamodel.prisma: The target datamodel for the migration.
  • steps.json: A summary of all the required steps to perform the migration.
  • README.md: A markdown file highlighting important information about the migration (e.g. a diff of the datamodel or the performed SQL statements).
3.2. Execute migration

To actually execute the migration against your database, run:

prisma2 lift up

This applies the steps specified in steps.json and therefore migrates the database schema to match the datamodel.

4. Run the GraphQL Server

Run the following command to run the GraphQL Server:

npm start

FAQs

Package last updated on 17 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc