Require selecting a db on new diagrams

This commit is contained in:
1ilit
2024-06-09 18:10:51 +03:00
parent be6ecb066c
commit b13d576c5e
4 changed files with 56 additions and 18 deletions

View File

@@ -103,3 +103,12 @@ export const SIDESHEET = {
TODO: 1,
TIMELINE: 2,
};
export const DB = {
MYSQL: "mysql",
POSTGRES: "postgresql",
MSSQL: "mssql",
SQLITE: "sqlite",
MARIADB: "mariadb",
GENERIC: "generic",
};

View File

@@ -3,38 +3,39 @@ import postgresImage from "../assets/postgres-icon.png";
import sqliteImage from "../assets/sqlite-icon.png";
import mariadbImage from "../assets/mariadb-icon.png";
import mssqlImage from "../assets/mssql-icon.png";
import i18n from "../i18n/i18n";
import { DB } from "./constants";
export const databases = [
{
name: "MySQL",
label: "mysql",
label: DB.MYSQL,
image: mysqlImage,
},
{
name: "PostgreSQL",
label: "postgresql",
label: DB.POSTGRES,
image: postgresImage,
},
{
name: "SQLite",
label: "sqlite",
label: DB.SQLITE,
image: sqliteImage,
},
{
name: "MariaDB",
label: "mariadb",
label: DB.MARIADB,
image: mariadbImage,
},
{
name: "MSSQL",
label: "mssql",
label: DB.MSSQL,
image: mssqlImage,
},
{
name: "Generic",
label: "generic",
name: i18n.t("generic"),
label: DB.GENERIC,
image: null,
description:
"Generic diagrams can be exported to any SQL flavor but support few data types.",
description: i18n.t("generic_description"),
},
];