Giter VIP home page Giter VIP logo

bocovo / db-schema-visualizer Goto Github PK

View Code? Open in Web Editor NEW
45.0 2.0 4.0 5.09 MB

A Visual Studio Code extension to visualize database schemas as Entity Relationship Diagrams (ERD) from DBML or Prisma files directly within the editor.

License: MIT License

JavaScript 2.70% TypeScript 96.52% HTML 0.76% CSS 0.02%
dbml entity-relationship-diagram erd erdiagram prisma uml-diagram vscode-extension

db-schema-visualizer's Introduction

Database schema visualizer

An Vscode extension to visualize the database schema in ERD from dbml or prisma file in your vscode.

Demo

DBML Demo

Features

  • Create entity relations diagrams from your DBML/Prisma code
  • Available in light and dark modes

How to install and use it

Follow this article: https://juste.bocovo.me/preview-dbml-code-from-vscode

Downloads

Extensions

Contribute

If you want to contribute to this project please read the contribution note

db-schema-visualizer's People

Contributors

bocovo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

db-schema-visualizer's Issues

Plugin behaves weird if there is similar table names in different schema

What's wrong

Plugin behaves weird if there is similar table names in different schema.
Tables are underplayed each other.
You can see two tables by dragging table on canvas. Both tables will be visible until you release MLB and don't move cursor.
If MLB released and cursor has been moved then one table disappears.
Then you can repeat above exercise as many times as you want.
Auto-arrange doesn't help at all.

Expected behaviour

To see all objects from all schemas. The same name in different schemas should not affect any process.

How to reproduce:

Actions are decribed above.

Here is the code.

table stage.test {
  field1 integer
}

table core.test {
  field2 integer
}

Table blocks not wide enough

Is there any way to control the size of table blocks in preview? We have a table with column email_verified_at of type timestamp and both words are overlapping making them unreadable. Column is just not wide enough.

overlap

General Question. DBML Full Spec

Hi @BOCOVO

Thanks for the quick turnaround on my initial issue (RE: Table names being truncated).

I was wondering if the full dbml specification has been implemented within this extention or just it just cater for a subset?

I see that column notes work, however when trying out other items, I can't seem to get that working.

  • Sticky Notes
  • TableGroup
  • Table Notes

Apologies if this has been documented somewhere, please feel free to point me to the docs just in case I missed it.

Regards
Rennie

Small but prominent typo

Insignificant but it caught my eye since it's front and center. The DBML preview window tab says "DBLM Diagram Preview".

Simple fix to two lines in packages/dbml-vs-code-extension/extension/constants/index.ts

Hover Highlight Config

Thanks so much for this extension. It's excellent!

One request would be to give some configurability over the mouse hover highlighting. One or more of:

  • ability to disable it entirely
  • ability to change colors of highlight under pointer
  • ability to change colors of highlight of PK/FK refs

I will use this as a teaching tool. Currently the highlighting is a bit distracting/confusing as I move my mouse around to describe model features, especially in dark mode.

Headercolor is random

Hello! Thank you for this plugin!
Could you please set the table's color according to table settings (https://dbml.dbdiagram.io/docs/#table-settings)?

Table users [headercolor: #3498DB] {
    id integer [primary key]
    username varchar(255) [not null, unique]
}

It's also would be nice to save position of existing tables on canvas)

Table names is being truncated.

Describe the bug
When adding a table name that is longer than the (ColumnName + DataType), the full table name does NOT get shown.

To Reproduce
Steps to reproduce the behavior:

  1. Create a .dbml file.
  2. Add the following DBML content to that file.
  3. Table dbo.tb_FairlyLongTableName { TestID INT Name NVARCHAR(100) Value NVARCHAR(300) CreatedDate DATETIME ModifiedDate DATETIME }
  4. Preview using the extension.

Expected behavior
To see the full table name.

Screenshots

Desktop (please complete the following information):

  • VSCode on windows.
  • Version [0.3.2] of the extension.

Ability to collapse/expand table to simplify the visualization

Hi @BOCOVO

At present, we use DBML to document our Star-Schema model for communication between Data Engineers, Data Analytics and Business Owners. Therefore, our table usually contains many columns (up-to 100) and the table height is really high (cannot fit into the screen in a readable scale).
So, it would be nice if we can collapse/expand the table definition in the visualization to improve the overview capacity (keep visualizing table and reference columns - or just the table)

Features:

  • Add a button on table header to toggle between Full/Compact (Optional)/Header Only mode.
  • Table Layout could be adjusted when switching between 3 modes (Optional)

Enhance table position computing with ELK's layout algorithms

Overview

The current implementation of table default position computation relies on a basic and static positioning algorithm. This often leads to suboptimal layouts, particularly as the complexity and size of data tables increase. To improve the visual organization and usability of the tables, we propose integrating Eclipse Layout Kernel (ELK) algorithms into our position computing system.

Objectives

  1. Improve Layout Efficiency: Utilize ELKโ€™s sophisticated algorithms to generate more efficient and visually appealing table layouts.
  2. Enhanced Readability: Increase the readability of tables by reducing overlap and improving the spatial distribution of elements.

Ressources

not working

Plugin is installed but buttons for preview are not showing up

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.