Skip to content

Commit c5d35dc

Browse files
committed
Merge branch 'main' of https://github.com/drawdb-io/drawdb into pr261
2 parents 965d1bb + 3e7d1ac commit c5d35dc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+4906
-2013
lines changed

.github/FUNDING.yml

-2
This file was deleted.

.github/workflows/build.yml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: [ "main" ]
66
pull_request:
77
branches: [ "main" ]
8+
types: [ opened, synchronize, reopened ]
89

910
jobs:
1011
build:

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ WORKDIR /app
44
COPY package*.json ./
55
RUN npm ci
66
COPY . .
7+
ENV NODE_OPTIONS="--max-old-space-size=4096"
78
RUN npm run build
89

910
# Stage 2: Setup the Nginx Server to serve the app

README.md

+20-17
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1-
<h3 align="center">
2-
<img width="80" alt="drawdb logo" src="./src/assets/icon-dark.png">
3-
</h3>
4-
5-
<h3 align="center">Free, simple, and intuitive database design tool and SQL generator.</h3>
6-
7-
<p align="center">
8-
<a href="https://drawdb.app/">drawDB</a>
9-
·
10-
<a href="https://discord.gg/BrjZgNrmR6">Discord</a>
11-
·
12-
<a href="https://x.com/drawDB_">X</a>
13-
</p>
14-
15-
<h3 align="center"><img width="700" style="border-radius:5px;" alt="demo" src="drawdb.gif"></h3>
16-
17-
## drawDB
1+
<div align="center">
2+
<img width="64" alt="drawdb logo" src="./src/assets/icon-dark.png">
3+
<h1>drawDB</h1>
4+
</div>
5+
6+
<h3 align="center">Free, simple, and intuitive database schema editor and SQL generator.</h3>
7+
8+
<div align="center" style="margin-bottom:12px;">
9+
<a href="https://drawdb.app/" style="display: flex; align-items: center;">
10+
<img src="https://img.shields.io/badge/Start%20building-grey" alt="drawDB"/>
11+
</a>
12+
<a href="https://discord.gg/BrjZgNrmR6" style="display: flex; align-items: center;">
13+
<img src="https://img.shields.io/discord/1196658537208758412.svg?label=Join%20the%20Discord&logo=discord" alt="Discord"/>
14+
</a>
15+
<a href="https://x.com/drawDB_" style="display: flex; align-items: center;">
16+
<img src="https://img.shields.io/badge/Follow%20us%20on%20X-blue?logo=X" alt="Follow us on X"/>
17+
</a>
18+
</div>
19+
20+
<h3 align="center"><img width="700" style="border-radius:5px;" alt="demo" src="drawdb.png"></h3>
1821

1922
DrawDB is a robust and user-friendly database entity relationship (DBER) editor right in your browser. Build diagrams with a few clicks, export sql scripts, customize your editor, and more without creating an account. See the full set of features [here](https://drawdb.app/).
2023

drawdb.gif

-1.98 MB
Binary file not shown.

drawdb.png

172 KB
Loading

package-lock.json

+97-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
"dependencies": {
1313
"@codemirror/lang-json": "^6.0.1",
1414
"@codemirror/lang-sql": "^6.6.3",
15+
"@dbml/core": "^3.9.7-alpha.0",
1516
"@douyinfe/semi-ui": "^2.51.3",
1617
"@lexical/react": "^0.12.5",
1718
"@uiw/codemirror-theme-github": "^4.21.25",
1819
"@uiw/codemirror-theme-vscode": "^4.21.25",
1920
"@uiw/react-codemirror": "^4.21.25",
2021
"@vercel/analytics": "^1.2.2",
22+
"@vercel/speed-insights": "^1.2.0",
2123
"axios": "^1.7.4",
2224
"classnames": "^2.5.1",
2325
"dexie": "^3.2.4",
@@ -30,7 +32,7 @@
3032
"jsonschema": "^1.4.1",
3133
"jspdf": "^2.5.1",
3234
"lexical": "^0.12.5",
33-
"node-sql-parser": "^5.3.2",
35+
"node-sql-parser": "^5.3.7",
3436
"octokit": "^4.0.2",
3537
"react": "^18.2.0",
3638
"react-dom": "^18.2.0",

public/robots.txt

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
User-agent: *
33
Allow: /
44
Allow: /editor
5-
Allow: /shortcuts
65
Allow: /templates
76
Disallow: /bug-report
87
Disallow: /survey

src/App.jsx

-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { useLayoutEffect } from "react";
33
import Editor from "./pages/Editor";
44
import Survey from "./pages/Survey";
55
import BugReport from "./pages/BugReport";
6-
import Shortcuts from "./pages/Shortcuts";
76
import Templates from "./pages/Templates";
87
import LandingPage from "./pages/LandingPage";
98
import SettingsContextProvider from "./context/SettingsContext";
@@ -33,14 +32,6 @@ export default function App() {
3332
</ThemedPage>
3433
}
3534
/>
36-
<Route
37-
path="/shortcuts"
38-
element={
39-
<ThemedPage>
40-
<Shortcuts />
41-
</ThemedPage>
42-
}
43-
/>
4435
<Route
4536
path="/bug-report"
4637
element={

src/components/EditorCanvas/Canvas.jsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
Action,
44
Cardinality,
55
Constraint,
6+
darkBgTheme,
67
ObjectType,
78
} from "../../data/constants";
89
import { Toast } from "@douyinfe/semi-ui";
@@ -431,9 +432,9 @@ export default function Canvas() {
431432
cardinality: Cardinality.ONE_TO_ONE,
432433
updateConstraint: Constraint.NONE,
433434
deleteConstraint: Constraint.NONE,
434-
name: `${tables[linkingLine.startTableId].name}_${
435+
name: `fk_${tables[linkingLine.startTableId].name}_${
435436
tables[linkingLine.startTableId].fields[linkingLine.startFieldId].name
436-
}_fk`,
437+
}_${tables[hoveredTable.tableId].name}`,
437438
id: relationships.length,
438439
};
439440
delete newRelationship.startX;
@@ -449,7 +450,7 @@ export default function Canvas() {
449450
(e) => {
450451
e.preventDefault();
451452

452-
if (e.ctrlKey) {
453+
if (e.ctrlKey || e.metaKey) {
453454
// How "eager" the viewport is to
454455
// center the cursor's coordinates
455456
const eagernessFactor = 0.05;
@@ -498,7 +499,7 @@ export default function Canvas() {
498499
className="w-full h-full"
499500
style={{
500501
cursor: pointer.style,
501-
backgroundColor: theme === "dark" ? "rgba(22, 22, 26, 1)" : "white",
502+
backgroundColor: theme === "dark" ? darkBgTheme : "white",
502503
}}
503504
>
504505
{settings.showGrid && (

0 commit comments

Comments
 (0)