Skip to content

Releases: smashboy/prismagram

v0.1.2

15 Mar 11:57
Compare
Choose a tag to compare
  • Fixed one-to-one relation unique attribute
  • Fixed deselecting a block after changing the block name

v0.1.1

08 Mar 10:18
dfc754b
Compare
Choose a tag to compare

Fix performance issues when schema editor is open.

v0.1.0

07 Mar 15:39
Compare
Choose a tag to compare

Enhanced spotlight

ezgif-5-b8aa92f664

  • Automatic scrolling is now supported when using keyboard navigation
  • Action now has shortcut label, if it has one
  • More options for models and enums, such as creating relations, fields, and deleting models and enums

New schema editor

ezgif-4-19ae91f5e7

  • Completely reworked schema editor, all your models, enums, generators and datasource now displays in a single navigation bar
  • Sortable schema blocks and fields
  • Generator and datasource moved from project settings to schema editor

Dark mode

ezgif-4-836aca8582

Explicit many-to-many relations

ezgif-4-f55326366f

Now when creating a many-to-many relation you can specify that you want the relation to be explicit, this will create an additional model.

v0.0.1

24 Feb 14:00
Compare
Choose a tag to compare

Prisma Features

DISCLAIMER!

If your schema file contains features that are not listed below, this data will be lost, so use the application with care.

Datasource

  • Select a data source connector from the list of available connectors
  • Set connection url value or switch to environment variable and set env key
  • Set shadow database url value or switch to environment variable and set env key
  • Select relation mode from the list

Prisma generator

  • Set generator output or switch to environment variable and set env key
  • Select preview features from the list of available features. Limitation: The list is currently static and will not load preview features for your version of prisma.
  • Select engine type
  • Select binary targets from the list of available targets

Enum

  • Create a new enum by dragging it into the editor
  • Remove the enum from your schema, all model fields that use this enum will be automatically removed
  • Change enum name, all model field types that use this enum will be automatically renamed
  • Add/edit/delete new enum values
  • Sort enum fields by dragging them
  • Create a new enum field in the model by connecting the enum to the model

Model

  • Create a new model by dragging it into the editor
  • Remove the model from your schema, all relations that use this model will be automatically removed.
  • Change model name, all model relations that use this model will be automatically renamed
  • Create scalar fields. List of supported scalar fields:
    • String
    • Boolean
    • Int
    • BigInt
    • Float
    • Decimal
    • DateTime
    • Json
    • Bytes
  • Create enum fields
  • Create relations between models by dragging connection line or clicking add relation button:
    • Create one to one relation
    • Create one to many relation
    • Create implicit many to many relation
    • Mark relation as optional
    • Set relation name
    • Set referential action onUpdate
    • Set referential action onDelete
  • Remove scalar, enum and relation fields, all fields referenced in the relation will be automatically deleted
  • Change the field name, if the field is referenced in a relation, it will be automatically renamed in the relation as well
  • Change scalar or enum field modifier to optional or list
  • Sort model fields by dragging them

Attributes

Currently the list of attributes below is supported, but at the moment you can't edit them with application. You can edit the prisma schema with your preferred editor and the application will automatically detect the changes and display them on the diagram.

Field attributes

ID

  • Supported fields:
    • map
    • length
    • sort
    • clustered

DEFAULT

  • Supported functions:
    • auto
    • autoincrement
    • sequence (partial)
    • cuid
    • now
    • dbgenerated (partial)

UNIQUE

  • Supported fields:
    • map
    • length
    • sort
    • clustered

MAP

  • Supported fields:
    • name

UPDATED_AT

Has no fields

IGNORE

Has no fields

RELATION

  • Supported fields:
    • name
    • fields
    • references
    • map
    • onUpdate
    • onDelete

Block attributes

IGNORE

Has no fields

MAP

  • Supported fields:
    • name

ID

  • Supported fields:
    • fields
    • name
    • map
    • length
    • sort
    • clustered

UNIQUE

  • Supported fields:
    • fields (partial)
    • name
    • map
    • length
    • sort
    • clustered

INDEX

  • Supported fields:
    • fields (partial)
    • name
    • map
    • length
    • sort
    • clustered
    • type

App features

Projects

  • Create and manage projects
  • Select your project directory and the application will automatically detect your prisma schema file

Editor

  • Undo, redo changes
  • Auto layout diagram nodes
  • Fit diagram into view
  • Zoom in and out
  • Drag nodes to custom positions
  • Drag and drop available nodes into editor

Spotlight and shortcuts

List of all shortcuts is available in app settings -> shortcuts settings

  • Search and select models and enums, the editor will zoom in on the selected node
  • Search and change active project
  • Search and activate common shortcuts