didin1453fatih / dbdesigner.id Goto Github PK
View Code? Open in Web Editor NEWDatabase designer online.
Home Page: https://dbdesigner.id
License: MIT License
Database designer online.
Home Page: https://dbdesigner.id
License: MIT License
Assalamualaikum...
Hello @didin1453fatih can i make docker version of this project and self hosted it to my own server ?
Thanks
Would you like to add export functionality to SQLite?
Here's a sketched example of a generator, made based on your own diagram structure
function toSQLite(diagram) {
return `${Object.keys(diagram)
.map(
(tableKey) => `
CREATE TABLE ${diagram[tableKey].table_name} (
${Object.keys(diagram[tableKey].coloumns)
.map(
(columnKey) =>
`${diagram[tableKey].coloumns[columnKey].coloumn_name} ${
diagram[tableKey].coloumns[columnKey].dataType
} ${diagram[tableKey].coloumns[columnKey].primaryKey ? "PRIMARY KEY" : ""}${
diagram[tableKey].coloumns[columnKey].primaryKey &&
diagram[tableKey].coloumns[columnKey].autoIncrement
? " AUTOINCREMENT"
: ""
}${diagram[tableKey].coloumns[columnKey].notNull ? " NOT NULL" : ""}${
diagram[tableKey].coloumns[columnKey].unique ? " UNIQUE" : ""
}`
)
.concat(
Object.keys(diagram[tableKey].coloumns)
.filter((columnKey) => diagram[tableKey].coloumns[columnKey].foreignKey)
.map((columnKey, index) => {
var association =
diagram[tableKey].association[diagram[tableKey].coloumns[columnKey].association_belong_id];
return `CONSTRAINT fk_${diagram[tableKey].table_name}_${diagram[association.table_id].table_name}_${
index + 1
} FOREIGN KEY (${diagram[tableKey].coloumns[columnKey].coloumn_name}) REFERENCES ${
diagram[association.table_id].table_name
} (${diagram[association.table_id].coloumns[association.targetKey].coloumn_name})`;
})
)
.join(",\n ")}
);`
)
.join("\n\n")}`;
}
An example of generating code from your diagram structure:
var diagram = {
"3559740f-4fc7-4a58-8088-a6813e22696b": {
table_name: "ies_group",
widthTable: 213,
heightTable: 0,
point: { x: 356, y: 95 },
coloumns: {
coloumn_car_id_885ddad7_c509_4d5e_ab2e_dc5cb06d0e35: {
coloumn_name: "id_ies_group",
comment: "",
dataType: "INTEGER",
default: "",
primaryKey: true,
notNull: false,
unique: false,
foreignKey: false,
unsigned: false,
zeroFill: false,
autoIncrement: true,
style: { shadowBlur: 0, shadowColor: "#00D2FF" },
association_belong_id: null,
association_has_id: ["assoc_Source_bca2a6ca-cddd-4765-b8cb-617c6a1bbb6f"],
},
"614a69f3-56bd-483e-bf86-bfc5da481587": {
coloumn_name: "ies_group_name",
comment: "",
dataType: "TEXT",
default: "",
primaryKey: false,
notNull: false,
unique: false,
foreignKey: false,
unsigned: false,
zeroFill: false,
autoIncrement: false,
style: { shadowBlur: 0, shadowColor: "green" },
association_belong_id: null,
association_has_id: [],
},
},
association: {
"assoc_Source_bca2a6ca-cddd-4765-b8cb-617c6a1bbb6f": {
connector_id: "conn_car_number_driver_idb26b82c8-d673-4590-90c5-89b19fb4ab5c",
type: "has",
table: "c0661ebf-848c-4cb9-9631-5fd79f1ed8b1",
table_id: "c0661ebf-848c-4cb9-9631-5fd79f1ed8b1",
foreignKey: "0cb79ff1-382b-4fea-bb9b-c41eb3f59e34",
foreignKey_id: "0cb79ff1-382b-4fea-bb9b-c41eb3f59e34",
sourceKey: "id",
sourceKey_id: "coloumn_car_id_885ddad7_c509_4d5e_ab2e_dc5cb06d0e35",
point: { x: 0, y: 40 },
},
},
},
"c0661ebf-848c-4cb9-9631-5fd79f1ed8b1": {
table_name: "ies_user",
widthTable: 199,
heightTable: 0,
point: { x: 26, y: 50 },
coloumns: {
coloumn_car_id_885ddad7_c509_4d5e_ab2e_dc5cb06d0e35: {
coloumn_name: "id_ies_user",
comment: "",
dataType: "INTEGER",
default: "",
primaryKey: true,
notNull: false,
unique: false,
foreignKey: false,
unsigned: false,
zeroFill: false,
autoIncrement: true,
style: { shadowBlur: 0, shadowColor: "green" },
association_belong_id: null,
association_has_id: [],
},
"a7d702a1-a0a7-4872-9263-264f1251bf04": {
coloumn_name: "surname",
comment: "",
dataType: "TEXT",
default: "",
primaryKey: false,
notNull: false,
unique: false,
foreignKey: false,
unsigned: false,
zeroFill: false,
autoIncrement: false,
style: { shadowBlur: 0, shadowColor: "green" },
association_belong_id: null,
association_has_id: [],
},
"058ca8d5-5167-4040-81af-0f5c6a1d9934": {
coloumn_name: "name",
comment: "",
dataType: "TEXT",
default: "",
primaryKey: false,
notNull: false,
unique: false,
foreignKey: false,
unsigned: false,
zeroFill: false,
autoIncrement: false,
style: { shadowBlur: 0, shadowColor: "green" },
association_belong_id: null,
association_has_id: [],
},
"590d2d29-4ce7-495a-beb0-3d019a473253": {
coloumn_name: "patronymic",
comment: "",
dataType: "TEXT",
default: "",
primaryKey: false,
notNull: false,
unique: false,
foreignKey: false,
unsigned: false,
zeroFill: false,
autoIncrement: false,
style: { shadowBlur: 0, shadowColor: "green" },
association_belong_id: null,
association_has_id: [],
},
"0cb79ff1-382b-4fea-bb9b-c41eb3f59e34": {
coloumn_name: "id_ies_group",
comment: "",
dataType: "INTEGER",
default: "",
primaryKey: false,
notNull: false,
unique: false,
foreignKey: true,
unsigned: false,
zeroFill: false,
autoIncrement: false,
style: { shadowBlur: 0, shadowColor: "#00D2FF" },
association_belong_id: "assoc_Foreign_a9cc4bb3-f08c-45d7-9652-725be4f61767",
association_has_id: [],
},
"cc88f304-7d7b-49b8-9f84-d32ef3141d7c": {
coloumn_name: "user_name",
comment: "",
dataType: "TEXT",
default: "",
primaryKey: false,
notNull: true,
unique: true,
foreignKey: false,
unsigned: false,
zeroFill: false,
autoIncrement: false,
style: { shadowBlur: 0, shadowColor: "green" },
association_belong_id: null,
association_has_id: [],
},
"44fac1ae-e045-4602-9741-a5ea07e42ef9": {
coloumn_name: "password",
comment: "",
dataType: "TEXT",
default: "",
primaryKey: false,
notNull: true,
unique: false,
foreignKey: false,
unsigned: false,
zeroFill: false,
autoIncrement: false,
style: { shadowBlur: 0, shadowColor: "green" },
association_belong_id: null,
association_has_id: [],
},
},
association: {
"assoc_Foreign_a9cc4bb3-f08c-45d7-9652-725be4f61767": {
connector_id: "conn_car_number_driver_idb26b82c8-d673-4590-90c5-89b19fb4ab5c",
type: "belong",
table: "3559740f-4fc7-4a58-8088-a6813e22696b",
table_id: "3559740f-4fc7-4a58-8088-a6813e22696b",
foreignKey: "0cb79ff1-382b-4fea-bb9b-c41eb3f59e34",
foreignKey_id: "0cb79ff1-382b-4fea-bb9b-c41eb3f59e34",
targetKey: "coloumn_car_id_885ddad7_c509_4d5e_ab2e_dc5cb06d0e35",
targetKey_id: "coloumn_car_id_885ddad7_c509_4d5e_ab2e_dc5cb06d0e35",
point: { x: 0, y: 120 },
},
},
},
};
console.log(toSQLite(diagram));
/******************************************************************
CREATE TABLE ies_group (
id_ies_group INTEGER PRIMARY KEY AUTOINCREMENT,
ies_group_name TEXT
);
CREATE TABLE ies_user (
id_ies_user INTEGER PRIMARY KEY AUTOINCREMENT,
surname TEXT ,
name TEXT ,
patronymic TEXT ,
id_ies_group INTEGER ,
user_name TEXT NOT NULL UNIQUE,
password TEXT NOT NULL,
CONSTRAINT fk_ies_user_ies_group_1 FOREIGN KEY (id_ies_group) REFERENCES ies_group (id_ies_group)
);
*/
hello, thanks for this tool, can you add an import option to import tables from MySql.
https://app.dbdesigner.id/?action=open&uuid=46938eb0-b576-4634-9d9d-aa624c6578dd
Error message: "Save failure Request failed with status code 502"
app.dbdesigner.id logs me out too often. Is it necessary?
Is there any option to move the tables around? I am trying to left click on table's header and then drag it but it doesn't work.
Not show me a message when do not have space on my hard drive, only show a white screen and clients can be think that not working,I had to go the console to find the error
by when is it planned to support the sqlite?
Hi,
I encounter this problem when running npm run serve
on the web interface :
Endpoint : http://localhost:8081/back-office/api/v1/account/read
Error : Proxy error: Could not proxy request /back-office/api/v1/account/read from localhost:8081 to http://localhost:81 (ECONNREFUSED).
Thanks for the help
I can understand the need/want to track usage on a centrally hosted server for you as the code repository owner.
However, unless this can be easily overridden or if you have an intention to fully disclose the metrics collected or if you explain clearly what you intend to do with the data and how to easily remove it, I'd personally request this be removed or commented out from the source.
Everytime my project saving, it always return 502 and I can't continue my work now
What is the license that the source code opened with?
I get this error whenever i try to confirm my email. I cant afford to loose the already saved document.
http://prntscr.com/scgvlr
Please, add a function to reorder existing columns.
I want to export my design to mysql but i show blank and i have this error in the console on click next button
Create Table Area :
Export Area:
Many of bug code is fix. but i need every one can contribute in this project. But his project is like noodle and it make every one head danche to do it.
In the current implementation I got hit with a PayLoadTooLargeError
that didn't become apparent until I reloaded one of my diagrams and I had lost a big chunk of my work.
This is what I did, in my own local environment, to make things work again:
diff --git a/backend/extension/core/event/onWebBeforeLoad.event.js b/backend/extension/core/event/onWebBeforeLoad.event.js
index a8e0211..527b3a0 100644
--- a/backend/extension/core/event/onWebBeforeLoad.event.js
+++ b/backend/extension/core/event/onWebBeforeLoad.event.js
@@ -44,7 +44,7 @@ module.exports = {
await app.use(bodyParser.urlencoded({ extended: false }));
console.log("ON yyy");
- await app.use(bodyParser.json());
+ await app.use(bodyParser.json({limit: '100Mb'}));
await app.use(bearerToken({
headerKey: 'Bearer'
}));
The change I did to the code isn't someting I recommend for anything going into production. I just set it to a very high value to avoid issues with this in the future.
Obrigada pela otima aplicacao desenvolvida.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.