Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull-request para las convenciones #4

Draft
wants to merge 28 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e7aedc3
Permito deployment en un subfolder
Francisco-Galindo Nov 5, 2024
5692161
Remove vercel/analytics
Francisco-Galindo Nov 5, 2024
ce6d75b
Remove vercel/analytics
Francisco-Galindo Nov 5, 2024
edacd61
Remove vercel/analytics
Francisco-Galindo Nov 5, 2024
20a2553
Revert "Permito deployment en un subfolder"
Francisco-Galindo Nov 5, 2024
390db68
Boton de oracle funciona pero no add table
lethalSopaper Nov 12, 2024
2ab32c9
datatypes.js fixed
lethalSopaper Nov 18, 2024
c83a85a
export oracle funciona, falta formato adecuado
lethalSopaper Dec 3, 2024
3f10019
Agregando convenciones a constraints
HanselTepal Dec 17, 2024
bc4a5a1
Fix header for rtl languages
1ilit Oct 31, 2024
d8dd071
Fix invalid sql after swapping fields (#287)
1ilit Nov 2, 2024
60a0bf6
Refactor date parsing logic and add Vector datatype
Bit0r Oct 27, 2024
0347eb4
Parse default casting
1ilit Nov 3, 2024
b7d91eb
Show import failed error
1ilit Nov 3, 2024
94b0daf
Parse references in sqlite
1ilit Nov 4, 2024
f30d566
Cache settings
1ilit Nov 8, 2024
1154c15
Update node-sql-parser version
1ilit Nov 10, 2024
10bf2f0
Update readme
1ilit Nov 10, 2024
b88adfa
Fix relationship swap table crashing
1ilit Nov 12, 2024
1cc5849
Add unshare functionality
1ilit Nov 23, 2024
a2d3b60
Fix loading already shared diagrams
1ilit Nov 23, 2024
9147866
Add copy button to code exports
1ilit Nov 29, 2024
f40b132
Fix overflow
1ilit Nov 29, 2024
e665b86
Add 'unshare' entry to the Hungarian localization
picimako Dec 1, 2024
1902e5d
nepali language feature added
sudhirVoid Dec 2, 2024
d906342
Fix primary key assignment from out of line PK constraints in pg
1ilit Jan 3, 2025
f219115
Add new lines for Russian localization (#324)
Denisskas Jan 3, 2025
880bdfb
Cambiando detalle de unique constraint
lethalSopaper Jan 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 23 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
<h3 align="center">
<img width="80" alt="drawdb logo" src="./src/assets/icon-dark.png">
</h3>

<h3 align="center">Free, simple, and intuitive database design tool and SQL generator.</h3>

<p align="center">
<a href="https://drawdb.app/">drawDB</a>
·
<a href="https://discord.gg/BrjZgNrmR6">Discord</a>
·
<a href="https://x.com/drawDB_">X</a>
</p>

<h3 align="center"><img width="700" style="border-radius:5px;" alt="demo" src="drawdb.gif"></h3>

## drawDB
<div align="center">
<img width="64" alt="drawdb logo" src="./src/assets/icon-dark.png">
<h1>drawDB</h1>
</div>

<h3 align="center">Free, simple, and intuitive database schema editor and SQL generator.</h3>

<div align="center" style="margin-bottom:12px;">
<a href="https://drawdb.app/" style="display: flex; align-items: center;">
<img src="https://img.shields.io/badge/Start%20building-grey" alt="drawDB"/>
</a>
<a href="https://discord.gg/BrjZgNrmR6" style="display: flex; align-items: center;">
<img src="https://img.shields.io/discord/1196658537208758412.svg?label=Join%20the%20Discord&logo=discord" alt="Discord"/>
</a>
<a href="https://x.com/drawDB_" style="display: flex; align-items: center;">
<img src="https://img.shields.io/badge/Follow%20us%20on%20X-blue?logo=X" alt="Follow us on X"/>
</a>
<a href="https://buymeacoffee.com/drawdb" style="display: flex; align-items: center;">
<img src="https://img.shields.io/badge/Support%20us-grey?logo=buymeacoffee" alt="Support us"/>
</a>
</div>

<h3 align="center"><img width="700" style="border-radius:5px;" alt="demo" src="drawdb.png"></h3>

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/).

Expand Down
Binary file removed drawdb.gif
Binary file not shown.
Binary file added drawdb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 8 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"@uiw/codemirror-theme-github": "^4.21.25",
"@uiw/codemirror-theme-vscode": "^4.21.25",
"@uiw/react-codemirror": "^4.21.25",
"@vercel/analytics": "^1.2.2",
"axios": "^1.7.4",
"classnames": "^2.5.1",
"dexie": "^3.2.4",
Expand All @@ -30,7 +29,7 @@
"jsonschema": "^1.4.1",
"jspdf": "^2.5.1",
"lexical": "^0.12.5",
"node-sql-parser": "^5.3.2",
"node-sql-parser": "^5.3.4",
"octokit": "^4.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
Binary file added src/assets/oracle-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 27 additions & 1 deletion src/components/EditorHeader/ControlPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
jsonToSQLite,
jsonToMariaDB,
jsonToSQLServer,
jsonToOracle,
} from "../../utils/exportSQL/generic";
import {
ObjectType,
Expand Down Expand Up @@ -827,6 +828,12 @@ export default function ControlPanel({
setImportDb(DB.MSSQL);
},
},
{
Oracle: () => {
setModal(MODAL.IMPORT_SRC);
setImportDb(DB.ORACLE);
},
},
],
}),
function: () => {
Expand Down Expand Up @@ -918,6 +925,22 @@ export default function ControlPanel({
}));
},
},
{
Oracle: () => {
setModal(MODAL.CODE);
const src = jsonToOracle({
tables: tables,
references: relationships,
types: types,
database: database,
});
setExportData((prev) => ({
...prev,
data: src,
extension: "sql",
}));
}
},
],
}),
function: () => {
Expand Down Expand Up @@ -1382,7 +1405,10 @@ export default function ControlPanel({
<>
<div>
{layout.header && (
<div className="flex justify-between items-center me-7">
<div
className="flex justify-between items-center me-7"
style={isRtl(i18n.language) ? { direction: "rtl" } : {}}
>
{header()}
{window.name.split(" ")[0] !== "t" && (
<Button
Expand Down
52 changes: 52 additions & 0 deletions src/components/EditorHeader/Modal/Code.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { useState } from "react";
import { sql } from "@codemirror/lang-sql";
import { json } from "@codemirror/lang-json";
import { vscodeDark } from "@uiw/codemirror-theme-vscode";
import { githubLight } from "@uiw/codemirror-theme-github";
import { useSettings } from "../../../hooks";
import { useTranslation } from "react-i18next";
import CodeMirror from "@uiw/react-codemirror";

const languageExtension = {
sql: [sql()],
json: [json()],
};

export default function Code({ value, language }) {
const { t } = useTranslation();
const { settings } = useSettings();
const [copied, setCopied] = useState(false);

const copyCode = () => {
navigator.clipboard
.writeText(value)
.then(() => {
setCopied(true);
setTimeout(() => {
setCopied(false);
}, 2000);
})
.catch((e) => {
console.log(e);
});
};

return (
<div className="relative">
<CodeMirror
value={value}
height="360px"
extensions={languageExtension[language]}
editable={false}
theme={settings.mode === "dark" ? vscodeDark : githubLight}
/>
<button
onClick={copyCode}
className={`absolute right-4 top-2 px-2 py-1 rounded ${settings.mode === "dark" ? "bg-zinc-700" : "bg-zinc-200"}`}
>
<i className={`bi bi-clipboard${copied ? "-check" : ""} me-2`} />
{t("copy")}
</button>
</div>
);
}
Loading
Loading