Skip to content

Commit

Permalink
fixing the type
Browse files Browse the repository at this point in the history
  • Loading branch information
invisal committed Sep 5, 2024
1 parent e04ae49 commit f949990
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/gui/schema-editor/column-provider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DatabaseTableColumnChange } from "@/drivers/base-driver";
import { PropsWithChildren, createContext, useContext } from "react";
import { DatabaseTableColumnChange } from ".";

const ColumnContext = createContext<{ columns: DatabaseTableColumnChange[] }>({
columns: [],
Expand Down
3 changes: 2 additions & 1 deletion src/components/gui/table-cell/generic-cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ export default function GenericCell({
const fkContent = useMemo(() => {
if (
header.foreignKey?.foreignTableName &&
header.foreignKey.foreignColumns
header.foreignKey.foreignColumns &&
header.foreignKey?.foreignSchemaName
) {
return (
<div className="flex items-center shrink-0 cursor-pointer ml-2">
Expand Down
5 changes: 3 additions & 2 deletions src/drivers/mysql/mysql-driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ export default abstract class MySQLLikeDriver extends CommonSQLImplement {
};

const tableKey = c.TABLE_SCHEMA + "." + c.TABLE_NAME;
if (tableRecord[tableKey].tableSchema) {
tableRecord[tableKey].tableSchema.columns.push(column);
const tableSchema = tableRecord[tableKey].tableSchema;
if (tableSchema) {
tableSchema.columns.push(column);
}
}

Expand Down

0 comments on commit f949990

Please sign in to comment.