Giter Site home page Giter Site logo

dolthub / dolt-workbench Goto Github PK

View Code? Open in Web Editor NEW
92.0 5.0 4.0 12.93 MB

A modern, browser-based, open source SQL workbench for your MySQL and PostgreSQL compatible database with version control features when connected to Dolt.

Home Page: https://hub.docker.com/r/dolthub/dolt-workbench

License: Apache License 2.0

JavaScript 0.88% TypeScript 93.58% CSS 5.30% Shell 0.04% Dockerfile 0.21%
dolt mysql workbench database-version-control git git-sql sql postgresql

dolt-workbench's Introduction

dolt-workbench

A modern, browser-based, open source SQL workbench for your MySQL and PostgreSQL compatible databases. Use Dolt to unlock powerful version control features. Doltgres support coming soon.

Get started on Docker Hub.

Features

Whether you decide to connect this workbench to a MySQL, Dolt, or PostgreSQL database, the Dolt Workbench has many features that make it the most modern and user-friendly web-based workbench on the market.

Modern, web-based table browser

Why is your SQL workbench stuck in 2003? The Dolt Workbench brings a modern browser-based UI to the workbench features you know and love. It makes browsing table data and schemas more intuitive and looks good doing it.

Modern, web based table-browser

Auto-generate SQL queries

Don't know SQL? Utilize table cell buttons and query helpers to generate and execute SQL queries for you, while learning SQL along the way. Or execute your own SQL queries from the console with the help of syntax highlighting.

SQL queries

Edit data using point and click interface

Cell buttons can also be used to edit data. Double click into any cell to edit its value and easily remove or add rows, columns, and tables using helper buttons.

Edit data

ER diagrams

ER diagrams are a great tool to visualize the entities in your database and the relationship between tables. They help to analyze the structure of the database.

ER diagrams

File upload

Upload files from your computer or use the spreadsheet editor to add or modify rows in your table directly from the web interface.

File upload

Version control features with Dolt

Dolt is a SQL database you can fork, clone, branch, merge, push and pull just like a Git repository. When connecting the workbench to a Dolt database, you gain access to these powerful version control features.

Commit log visualizations

Easily visualize your commits and understand your commit history from the commit graph. It displays information about branches, commits, and collaborators in a single view. You'll be able to easily identify contributions, track down specific commits, and gain valuable insights into your development process.

Commit graph

Branch navigation

A branch adds non-distributed, write isolation to your database. If you have a set of database changes that logically should be grouped or reviewed together, you make those changes on a branch.

Branch navigation

Tags

Tag your data at a commit to represent a data release. Data releases are a collection of data with a specific schema and known set of data points. They are often used to represent data you may want to recreate at a later date, like to reproduce a machine learning model.

Tags

Pull requests

Pull requests are a way to propose changes to a database. A pull request is created from a branch with new changes that a user would like to make to another branch (commonly the main branch). Easily review the diff of proposed changes and think through potential improvements or implications of the change. The pull request can then be merged, which will update the base branch with the changes from the feature branch.

Pull requests

Getting started

The easiest way to get started is with Docker. Assuming you have Docker installed and running, you can simply pull and run the Docker image.

% docker pull dolthub/dolt-workbench:latest
% docker run -p 9002:9002 -p 3000:3000 dolthub/dolt-workbench:latest

Navigate to http://localhost:3000 to enter your database information. See instructions on Docker Hub for connecting to local and Docker installed databases.

Saving connection information between runs

Using the file store

If you want to save connection metadata between Docker runs, you can mount a local directory to the store directory in /app/graphql-server in the container.

% docker run -p 9002:9002 -p 3000:3000 -v ~/path/to/store:/app/graphql-server/store dolthub/dolt-workbench:latest

Using a MySQL database

You can also persist connection metadata in a MySQL-compatible database by providing database connection information through environment variables.

Using a .env file:

# Specify individual fields:
DW_DB_DBNAME=dolt_workbench
DW_DB_PORT=3306
DW_DB_USER=<username>
DW_DB_PASS=<password>
DW_DB_HOST=host.docker.internal

# Or use a connection URI:
DW_DB_CONNECTION_URI=mysql://<username>:<password>@host.docker.internal:3306/dolt_workbench

# For databases that require secure connections
DW_DB_USE_SSL=true
% docker run -p 9002:9002 -p 3000:3000 --env-file <env_file_name> dolthub/dolt-workbench:latest

Or use the -e flag:

% docker run -p 9002:9002 -p 3000:3000 -e DW_DB_CONNECTION_URI="mysql://<username>:<password>@host.docker.internal:3306/dolt_workbench" dolthub/dolt-workbench:latest

Note that we do not create the database dolt_workbench for you. You must create it yourself:

CREATE DATABASE dolt_workbench;

Getting started from source

First, clone this repository.

Run the GraphQL server

Start the GraphQL server. If successful, you'll see the GraphQL playground when you navigate to localhost:9002/graphql.

% cd graphql-server
graphql-server % yarn && yarn compile
graphql-server % yarn dev

Run the web server

In another shell, start the web server. This will automatically point at the running GraphQL server (localhost:9002).

% cd packages/web
web % yarn && yarn compile
web % yarn dev

Open your browser to localhost:3002.

dolt-workbench's People

Contributors

dependabot[bot] avatar liuliu-dev avatar tamalign avatar tbantle22 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dolt-workbench's Issues

Setup a new connection error, main branch issue and secure connection problem

Hello dolt-workbench developers.

I've been using dolt-workbench for some time and it's great. However, I have couple of small issues found and would like to share them with you.

My dolt-workbench version is docker image: dolthub/dolt-workbench:0.2.7.
I use it with dolthub/dolt-sql-server:1.35.7.

  1. Setup new connection fails but connection created.

During setup of a new connection to database (dolt sql server in my case), despite error occurs (for example 'getaddrinfo ENOTFOUND'), connection is created and the connection name is registered so I cannot use it when I retry to create same connection. It ends with error 'name already exists'. It seems more reasonable to not create connection when a creation request fails.

  1. Staying on 'main' when trying to see commits for different branch.

Starting from "Database" tab, I switch a branch to the different one and then when I go to "Commit Log" tab, it switches back automatically to main branch. I would like to keep the chosen branch when moving through tabs.

  1. "Server does not support secure connection" when in "Spreadsheet Editor" mode.

When I want to update a table using "Spreadsheet Editor", it errors with "Server does not support secure connection" even thought, I've set the connection "Use SSL" unchecked during connection initialization.

Happy to provide more details if necessary.

Be able to persist metadata into a database rather than on the filesystem itself

Screen Shot 2024-02-05 at 12 46 37 PM

We run a lot of apps in a stateless system (that can restart processes) and doesn't allow mount points. Is there anyway this tool can store its metadata into an external database (like mysql rds or dolt itself)?

Here is how metabase works, It can be provided the database credentials via environment variable which would be ideal:

https://www.metabase.com/docs/latest/installation-and-operation/configuring-application-database#mysql-or-mariadb

Passthrough the Author for Commits

Currently HostedDolt allows us to use the authors email on commits as follows:
Screen Shot 2024-04-17 at 10 33 28 AM

However there is no way to specify the committer in dolt workbench currently:
Screen Shot 2024-04-17 at 10 34 27 AM

This then logs a user without a clear identifier. How can we pass through a header indicating the user making the commit itself, for instance we have a reverse proxy like nginx or oauth2proxy in front that can feed in X-Forwarded-Email which we should use in our commits (https://oauth2-proxy.github.io/oauth2-proxy/configuration/overview#config-file)

Screen Shot 2024-04-17 at 10 45 36 AM

Specify the GraphQL server address from the frontend itself

When running this docker image locally things work fine. However in our hosting setup we run into the following error:

Screen Shot 2024-02-07 at 6 10 12 PM

We have to run two processes, one for the HTTP web server and one for the GraphQL Server. How do we tell the HTTP process the precise GraphQL address to route its requests to?

Could we make both the WebUI and graphql server listen on the same port and route to the same location (https://host:port)?

Question: Supporting SQLite as well?

As this repo's Readme points out, I too have found that the modern landscape of SQL workbenches is less than modern and was excited to see Dolt's contribution to this space for MySQL.

I was wondering if you all have considered being able to also use this workbench for SQLite? ๐Ÿ™

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.