Unverified Commit 7092ea3f authored by yqwoe's avatar yqwoe Committed by GitHub

fix: shortcut key problem; editor theme switching problem; editor full screen;…

fix: shortcut key problem; editor theme switching problem; editor full screen; database field length; (#2436) * feat: use-service hooks * fix: 快捷键问题;编辑器主题切换问题;编辑 器全屏;数据库字段长度; * fix:提交 .mvn * fix:提交 .idea * fix:提交 .gitignore * fix:提交 maven-wrapper.jar * fix:提交 .gitignore
parent 4256a3bd
...@@ -26,7 +26,7 @@ logs.zip ...@@ -26,7 +26,7 @@ logs.zip
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid* hs_err_pid*
.idea/* .idea/*
!.idea/icon.png !.idea/icon.svg
!.idea/vcs.xml !.idea/vcs.xml
build build
target/* target/*
......
...@@ -1642,7 +1642,7 @@ CREATE TABLE `dinky_metrics` ( ...@@ -1642,7 +1642,7 @@ CREATE TABLE `dinky_metrics` (
`position` int(11) DEFAULT null, `position` int(11) DEFAULT null,
`show_type` varchar(255) DEFAULT null, `show_type` varchar(255) DEFAULT null,
`show_size` varchar(255) DEFAULT null, `show_size` varchar(255) DEFAULT null,
`title` varchar(255) DEFAULT null, `title` CLOB DEFAULT null,
`layout_name` varchar(255) DEFAULT null, `layout_name` varchar(255) DEFAULT null,
`create_time` datetime DEFAULT null, `create_time` datetime DEFAULT null,
`update_time` datetime DEFAULT null `update_time` datetime DEFAULT null
......
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
"redux-persist": "^6.0.0", "redux-persist": "^6.0.0",
"remark-gfm": "^4.0.0", "remark-gfm": "^4.0.0",
"screenfull": "^6.0.2", "screenfull": "^6.0.2",
"sql-formatter": "^13.0.1",
"styled-components": "^6.0.8", "styled-components": "^6.0.8",
"use-sse": "^2.0.1" "use-sse": "^2.0.1"
}, },
......
...@@ -31,6 +31,7 @@ import { persistReducer, persistStore } from 'redux-persist'; ...@@ -31,6 +31,7 @@ import { persistReducer, persistStore } from 'redux-persist';
import storage from 'redux-persist/lib/storage'; import storage from 'redux-persist/lib/storage';
import { Navigate } from 'umi'; import { Navigate } from 'umi';
import { default as defaultSettings, default as Settings } from '../config/defaultSettings'; import { default as defaultSettings, default as Settings } from '../config/defaultSettings';
import { FullScreenProvider } from './hooks/useEditor';
import { errorConfig } from './requestErrorConfig'; import { errorConfig } from './requestErrorConfig';
import { getDataByParamsReturnResult } from './services/BusinessCrud'; import { getDataByParamsReturnResult } from './services/BusinessCrud';
import { API } from './services/data'; import { API } from './services/data';
...@@ -114,6 +115,39 @@ export async function getInitialState(): Promise<{ ...@@ -114,6 +115,39 @@ export async function getInitialState(): Promise<{
// ProLayout 支持的api https://procomponents.ant.design/components/layout // ProLayout 支持的api https://procomponents.ant.design/components/layout
export const layout: RunTimeLayoutConfig = ({ initialState }) => { export const layout: RunTimeLayoutConfig = ({ initialState }) => {
console.log(initialState);
const fullscreen = initialState?.fullscreen;
const defaultSettings = {
onPageChange: () => {
const { location } = history;
// 如果没有登录,重定向到 login
if (!initialState?.currentUser && location.pathname !== loginPath) {
history.push(loginPath);
}
},
// 自定义 403 页面
unAccessible: <UnAccessible />,
// 增加一个 loading 的状态
childrenRender: (children) => {
return initialState?.loading ? (
<PageLoading />
) : (
<AccessContextProvider currentUser={initialState?.currentUser}>
<FullScreenProvider>{children}</FullScreenProvider>
</AccessContextProvider>
);
}
};
if (fullscreen) {
return {
...initialState?.settings,
siderWidth: 0,
...defaultSettings,
layout: 'side'
};
}
return { return {
headerTitleRender: () => { headerTitleRender: () => {
// 重新对 title 的设置进行设置 // 重新对 title 的设置进行设置
...@@ -135,25 +169,7 @@ export const layout: RunTimeLayoutConfig = ({ initialState }) => { ...@@ -135,25 +169,7 @@ export const layout: RunTimeLayoutConfig = ({ initialState }) => {
theme === THEME.light || undefined ? 'rgba(0, 0, 0, 0.15)' : 'rgba(255, 255, 255, 0.15)' theme === THEME.light || undefined ? 'rgba(0, 0, 0, 0.15)' : 'rgba(255, 255, 255, 0.15)'
},*/ },*/
isChildrenLayout: true, isChildrenLayout: true,
onPageChange: () => { ...defaultSettings,
const { location } = history;
// 如果没有登录,重定向到 login
if (!initialState?.currentUser && location.pathname !== loginPath) {
history.push(loginPath);
}
},
// 自定义 403 页面
unAccessible: <UnAccessible />,
// 增加一个 loading 的状态
childrenRender: (children) => {
return initialState?.loading ? (
<PageLoading />
) : (
<AccessContextProvider currentUser={initialState?.currentUser}>
{children}
</AccessContextProvider>
);
},
...initialState?.settings ...initialState?.settings
}; };
}; };
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
*/ */
import { TabsItemType } from '@/pages/DataStudio/model'; import { TabsItemType } from '@/pages/DataStudio/types';
import { Button } from 'antd'; import { Button } from 'antd';
import React from 'react'; import React from 'react';
......
...@@ -141,7 +141,7 @@ const CodeEdit = (props: CodeEditFormProps) => { ...@@ -141,7 +141,7 @@ const CodeEdit = (props: CodeEditFormProps) => {
className={'editor-develop'} className={'editor-develop'}
onMount={editorDidMount} onMount={editorDidMount}
onChange={onChange} onChange={onChange}
theme={theme ? theme : convertCodeEditTheme()} theme={convertCodeEditTheme()}
/> />
{showFloatButton && <EditorFloatBtn {...restEditBtnProps} />} {showFloatButton && <EditorFloatBtn {...restEditBtnProps} />}
</div> </div>
......
...@@ -242,7 +242,7 @@ const CodeShow = (props: CodeShowFormProps) => { ...@@ -242,7 +242,7 @@ const CodeShow = (props: CodeShowFormProps) => {
} }
}} }}
onMount={editorDidMount} onMount={editorDidMount}
theme={theme ? theme : convertCodeEditTheme()} theme={convertCodeEditTheme()}
/> />
{/* float button */} {/* float button */}
......
...@@ -399,6 +399,12 @@ h5 { ...@@ -399,6 +399,12 @@ h5 {
scrollbar-width: thin; scrollbar-width: thin;
} }
.editor-full-screen{
.ant-tabs-tabpane{
height: 100vh;
}
}
.data-studio-tabs { .data-studio-tabs {
.ant-tabs-nav { .ant-tabs-nav {
.ant-tabs-nav-wrap { .ant-tabs-nav-wrap {
......
import {
createContext,
Dispatch,
FC,
memo,
SetStateAction,
useContext,
useEffect,
useState
} from 'react';
import { flushSync } from 'react-dom';
import { useModel } from 'umi';
export interface FullScreenContextProps {
fullscreen: boolean;
setFullscreen: Dispatch<SetStateAction<boolean>>;
}
export const FullScreenContext = createContext<FullScreenContextProps>(
{} as FullScreenContextProps
);
export const FullScreenProvider: FC = memo(({ children }) => {
const [fullscreen, setFullscreen] = useState<boolean>(false);
const { initialState, setInitialState } = useModel('@@initialState');
useEffect(() => {
flushSync(() => {
setInitialState((s) => ({
...s,
fullscreen
}));
});
}, [fullscreen]);
return (
<FullScreenContext.Provider value={{ fullscreen, setFullscreen }}>
{children}
</FullScreenContext.Provider>
);
});
export const useEditor = () => useContext(FullScreenContext);
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
import useThemeValue from '@/hooks/useThemeValue'; import useThemeValue from '@/hooks/useThemeValue';
import JobRunningModal from '@/pages/DataStudio/FooterContainer/JobRunningModal'; import JobRunningModal from '@/pages/DataStudio/FooterContainer/JobRunningModal';
import { getCurrentTab } from '@/pages/DataStudio/function'; import { getCurrentTab } from '@/pages/DataStudio/function';
import { StateType, TabsPageType, VIEW } from '@/pages/DataStudio/model'; import { StateType,TabsPageType,VIEW} from '@/pages/DataStudio/model';
import { getSseData } from '@/services/api'; import { getSseData } from '@/services/api';
import { l } from '@/utils/intl'; import { l } from '@/utils/intl';
import { connect } from '@@/exports'; import { connect } from '@@/exports';
......
...@@ -196,8 +196,8 @@ const HeaderContainer = (props: any) => { ...@@ -196,8 +196,8 @@ const HeaderContainer = (props: any) => {
const routes: ButtonRoute[] = [ const routes: ButtonRoute[] = [
// 保存按钮 icon // 保存按钮 icon
{ {
hotKey: (e: KeyboardEvent) => e.ctrlKey && e.key === 's', hotKey: (e: KeyboardEvent) => e.ctrlKey && e.key === 's' || e.metaKey && e.key === 's',
hotKeyDesc: 'Ctrl+S', hotKeyDesc: 'Ctrl/Command +S',
isShow: projectCommonShow(currentTab?.type), isShow: projectCommonShow(currentTab?.type),
icon: <SaveOutlined />, icon: <SaveOutlined />,
title: l('button.save'), title: l('button.save'),
...@@ -216,6 +216,8 @@ const HeaderContainer = (props: any) => { ...@@ -216,6 +216,8 @@ const HeaderContainer = (props: any) => {
{ {
// 检查 sql按钮 // 检查 sql按钮
icon: <ScheduleOutlined />, icon: <ScheduleOutlined />,
hotKey: (e: KeyboardEvent) => e.altKey && e.code === 'Digit2' || e.altKey && e.key === '@',
hotKeyDesc: 'Alt+2/@',
title: l('pages.datastudio.editor.check'), title: l('pages.datastudio.editor.check'),
click: () => showExplain(), click: () => showExplain(),
isShow: projectCommonShow(currentTab?.type) isShow: projectCommonShow(currentTab?.type)
......
...@@ -28,12 +28,16 @@ import { ...@@ -28,12 +28,16 @@ import {
} from '@/pages/DataStudio/model'; } from '@/pages/DataStudio/model';
import { JOB_LIFE_CYCLE } from '@/pages/DevOps/constants'; import { JOB_LIFE_CYCLE } from '@/pages/DevOps/constants';
import { API_CONSTANTS } from '@/services/endpoints'; import { API_CONSTANTS } from '@/services/endpoints';
import { convertCodeEditTheme } from '@/utils/function';
import { l } from '@/utils/intl'; import { l } from '@/utils/intl';
import { connect, useRequest } from '@@/exports'; import { connect, useRequest } from '@@/exports';
import { FullscreenExitOutlined, FullscreenOutlined } from '@ant-design/icons';
import { Editor } from '@monaco-editor/react'; import { Editor } from '@monaco-editor/react';
import { Spin } from 'antd'; import { Button, Spin } from 'antd';
import { editor } from 'monaco-editor'; import { editor, KeyCode, KeyMod } from 'monaco-editor';
import React, { useState } from 'react'; import React, { useState } from 'react';
import { format } from 'sql-formatter';
import { useEditor } from '@/hooks/useEditor';
export type EditorProps = { export type EditorProps = {
taskId: number; taskId: number;
...@@ -48,6 +52,8 @@ const CodeEditor: React.FC<EditorProps & any> = (props) => { ...@@ -48,6 +52,8 @@ const CodeEditor: React.FC<EditorProps & any> = (props) => {
const [isModalOpen, setIsModalOpen] = useState(false); const [isModalOpen, setIsModalOpen] = useState(false);
const [diff, setDiff] = useState<any>([]); const [diff, setDiff] = useState<any>([]);
const { fullscreen, setFullscreen } = useEditor();
const [editorIns, setEditorIns] = useState<editor.IStandaloneCodeEditor>(null);
const currentTab = getCurrentTab(panes, activeKey) as DataStudioTabsItemType; const currentTab = getCurrentTab(panes, activeKey) as DataStudioTabsItemType;
const currentData = currentTab.params.taskData; const currentData = currentTab.params.taskData;
...@@ -89,12 +95,15 @@ const CodeEditor: React.FC<EditorProps & any> = (props) => { ...@@ -89,12 +95,15 @@ const CodeEditor: React.FC<EditorProps & any> = (props) => {
}; };
return ( return (
<> <Spin spinning={loading} delay={600}>
<Spin spinning={loading} delay={600}></Spin> <div style={{ width: '100%', height: fullscreen ? 'calc(100vh - 50px)' : '33vh' }}>
<DiffModal diffs={diff} open={isModalOpen} fileName={currentData?.name} onUse={upDateTask} /> <DiffModal
diffs={diff}
open={isModalOpen}
fileName={currentData?.name}
onUse={upDateTask}
/>
<Editor <Editor
width={'100%'}
height={'100%'}
value={currentTab?.params?.taskData?.statement} value={currentTab?.params?.taskData?.statement}
language={'sql'} language={'sql'}
options={{ options={{
...@@ -113,7 +122,8 @@ const CodeEditor: React.FC<EditorProps & any> = (props) => { ...@@ -113,7 +122,8 @@ const CodeEditor: React.FC<EditorProps & any> = (props) => {
verticalScrollbarSize: 8, verticalScrollbarSize: 8,
horizontalScrollbarSize: 8, horizontalScrollbarSize: 8,
arrowSize: 30 arrowSize: 30
} },
automaticLayout: true
}} }}
className={'editor-develop'} className={'editor-develop'}
onMount={(editor: editor.IStandaloneCodeEditor) => { onMount={(editor: editor.IStandaloneCodeEditor) => {
...@@ -127,12 +137,17 @@ const CodeEditor: React.FC<EditorProps & any> = (props) => { ...@@ -127,12 +137,17 @@ const CodeEditor: React.FC<EditorProps & any> = (props) => {
payload: { ...props.footContainer } payload: { ...props.footContainer }
}); });
}); });
editor.addCommand(KeyMod.Alt | KeyCode.Digit3, () => {
editor?.trigger('anyString', 'editor.action.formatDocument');
editor.setValue(format(editor.getValue()));
});
setEditorIns(editor);
}} }}
onChange={(v) => { onChange={(v) => {
if (!currentData || !currentTab) { if (!currentData || !currentTab) {
return; return;
} }
if (typeof v === 'string') { if (typeof v === 'string') {
currentData.statement = v; currentData.statement = v;
} }
...@@ -142,9 +157,43 @@ const CodeEditor: React.FC<EditorProps & any> = (props) => { ...@@ -142,9 +157,43 @@ const CodeEditor: React.FC<EditorProps & any> = (props) => {
payload: { ...props.tabs } payload: { ...props.tabs }
}); });
}} }}
theme={'vs-dark'} theme={convertCodeEditTheme()}
></Editor>
<div
style={{
position: 'absolute',
top: 0,
right: 150
}}
>
{fullscreen ? (
<Button
type='text'
style={{
color: '#fff'
}}
icon={<FullscreenExitOutlined />}
onClick={() => {
editorIns.layout();
setFullscreen(false);
}}
/>
) : (
<Button
type='text'
style={{
color: '#fff'
}}
icon={<FullscreenOutlined />}
onClick={() => {
editorIns.layout();
setFullscreen(true);
}}
/> />
</> )}
</div>
</div>
</Spin>
); );
}; };
......
...@@ -22,7 +22,7 @@ import { l } from '@/utils/intl'; ...@@ -22,7 +22,7 @@ import { l } from '@/utils/intl';
export const KEY_BOARD_MIDDLE = [ export const KEY_BOARD_MIDDLE = [
{ {
key: 'ctrls', key: 'ctrls',
label: 'Ctrl + S', label: 'Ctrl / Command + S',
description: l('shortcut.key.save') description: l('shortcut.key.save')
}, },
{ {
...@@ -35,16 +35,16 @@ export const KEY_BOARD_MIDDLE = [ ...@@ -35,16 +35,16 @@ export const KEY_BOARD_MIDDLE = [
label: 'Alt + 3', label: 'Alt + 3',
description: l('shortcut.key.beautify') description: l('shortcut.key.beautify')
}, },
{ // {
key: 'f2', // key: 'f2',
label: 'F2', // label: 'F2',
description: l('shortcut.key.fullscreen') // description: l('shortcut.key.fullscreen')
}, // },
{ // {
key: 'esc', // key: 'esc',
label: 'Esc', // label: 'Esc',
description: l('shortcut.key.fullscreenClose') // description: l('shortcut.key.fullscreenClose')
} // }
]; ];
export const KEY_BOARD_RIGHT_SLIDER = [ export const KEY_BOARD_RIGHT_SLIDER = [
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
*/ */
import ContentScroll from '@/components/Scroll/ContentScroll'; import ContentScroll from '@/components/Scroll/ContentScroll';
import { useEditor } from '@/hooks/useEditor';
import useThemeValue from '@/hooks/useThemeValue'; import useThemeValue from '@/hooks/useThemeValue';
import { STUDIO_TAG_RIGHT_CONTEXT_MENU } from '@/pages/DataStudio/constants'; import { STUDIO_TAG_RIGHT_CONTEXT_MENU } from '@/pages/DataStudio/constants';
import { import {
...@@ -50,6 +51,9 @@ const MiddleContainer = (props: any) => { ...@@ -50,6 +51,9 @@ const MiddleContainer = (props: any) => {
} = props; } = props;
const themeValue = useThemeValue(); const themeValue = useThemeValue();
const {fullscreen} = useEditor();
const [contextMenuPosition, setContextMenuPosition] = useState({}); const [contextMenuPosition, setContextMenuPosition] = useState({});
const [contextMenuVisible, setContextMenuVisible] = useState(false); const [contextMenuVisible, setContextMenuVisible] = useState(false);
const [includeTab, setIncludeTab] = useState({}); const [includeTab, setIncludeTab] = useState({});
...@@ -248,7 +252,7 @@ const MiddleContainer = (props: any) => { ...@@ -248,7 +252,7 @@ const MiddleContainer = (props: any) => {
</Space> </Space>
), ),
children: ( children: (
<ContentScroll height={activeKey === item.key ? props.centerContentHeight - 35 : 0}> <ContentScroll height={activeKey === item.key ? fullscreen ? document.body.clientHeight : props.centerContentHeight - 35 : 0}>
{renderContent()} {renderContent()}
</ContentScroll> </ContentScroll>
) )
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
*/ */
import { AuthorizedObject, useAccess } from '@/hooks/useAccess'; import { AuthorizedObject, useAccess } from '@/hooks/useAccess';
import { FullScreenProvider, useEditor } from '@/hooks/useEditor';
import useThemeValue from '@/hooks/useThemeValue'; import useThemeValue from '@/hooks/useThemeValue';
import BottomContainer from '@/pages/DataStudio/BottomContainer'; import BottomContainer from '@/pages/DataStudio/BottomContainer';
import FooterContainer from '@/pages/DataStudio/FooterContainer'; import FooterContainer from '@/pages/DataStudio/FooterContainer';
...@@ -68,6 +69,8 @@ const DataStudio = (props: any) => { ...@@ -68,6 +69,8 @@ const DataStudio = (props: any) => {
const persist = app._store.persist; const persist = app._store.persist;
const bottomHeight = bottomContainer.selectKey === '' ? 0 : bottomContainer.height; const bottomHeight = bottomContainer.selectKey === '' ? 0 : bottomContainer.height;
const { fullscreen } = useEditor();
const getClientSize = () => ({ const getClientSize = () => ({
width: document.documentElement.clientWidth, width: document.documentElement.clientWidth,
height: document.documentElement.clientHeight, height: document.documentElement.clientHeight,
...@@ -197,6 +200,9 @@ const DataStudio = (props: any) => { ...@@ -197,6 +200,9 @@ const DataStudio = (props: any) => {
); );
return ( return (
fullscreen ? (
<MiddleContainer />
) : (
<PageContainer title={false} breadcrumb={{ style: { display: 'none' } }}> <PageContainer title={false} breadcrumb={{ style: { display: 'none' } }}>
<PersistGate loading={null} persistor={persist}> <PersistGate loading={null} persistor={persist}>
<div style={{ marginInline: -10, marginTop: -6, width: size.width }}> <div style={{ marginInline: -10, marginTop: -6, width: size.width }}>
...@@ -222,7 +228,10 @@ const DataStudio = (props: any) => { ...@@ -222,7 +228,10 @@ const DataStudio = (props: any) => {
<Content <Content
style={{ style={{
width: width:
size.width - 2 * VIEW.sideWidth - leftContainer.width - rightContainer.width size.width -
2 * VIEW.sideWidth -
leftContainer.width -
rightContainer.width
}} }}
> >
<MiddleContainer /> <MiddleContainer />
...@@ -240,6 +249,7 @@ const DataStudio = (props: any) => { ...@@ -240,6 +249,7 @@ const DataStudio = (props: any) => {
</div> </div>
</PersistGate> </PersistGate>
</PageContainer> </PageContainer>
)
); );
}; };
......
...@@ -32,6 +32,7 @@ import HistoryVersion from '@/pages/DataStudio/RightContainer/HistoryVersion'; ...@@ -32,6 +32,7 @@ import HistoryVersion from '@/pages/DataStudio/RightContainer/HistoryVersion';
import JobConfig from '@/pages/DataStudio/RightContainer/JobConfig'; import JobConfig from '@/pages/DataStudio/RightContainer/JobConfig';
import JobInfo from '@/pages/DataStudio/RightContainer/JobInfo'; import JobInfo from '@/pages/DataStudio/RightContainer/JobInfo';
import SavePoints from '@/pages/DataStudio/RightContainer/SavePoints'; import SavePoints from '@/pages/DataStudio/RightContainer/SavePoints';
import { convertCodeEditTheme } from '@/utils/function';
import { l } from '@/utils/intl'; import { l } from '@/utils/intl';
import { import {
ApartmentOutlined, ApartmentOutlined,
...@@ -210,6 +211,7 @@ export const LeftBottomMoreTabs: { [c: string]: TabProp[] } = { ...@@ -210,6 +211,7 @@ export const LeftBottomMoreTabs: { [c: string]: TabProp[] } = {
} }
}} }}
language={'text'} language={'text'}
theme={convertCodeEditTheme()}
/> />
) )
}, },
......
...@@ -124,6 +124,7 @@ export function getLocalTheme(): string { ...@@ -124,6 +124,7 @@ export function getLocalTheme(): string {
* @constructor * @constructor
*/ */
export function convertCodeEditTheme() { export function convertCodeEditTheme() {
/** /**
* user can define a new theme by calling the defineTheme method on the editor. * user can define a new theme by calling the defineTheme method on the editor.
*/ */
...@@ -146,7 +147,7 @@ export function convertCodeEditTheme() { ...@@ -146,7 +147,7 @@ export function convertCodeEditTheme() {
], ],
// colors is an object of color identifiers and their color values. // colors is an object of color identifiers and their color values.
colors: { colors: {
'editor.background': '#5d5b5b', // editor background color 'editor.background': '#2f2e2e', // editor background color
'editor.lineHighlightBackground': '#959cb6', // editor line highlight background color 'editor.lineHighlightBackground': '#959cb6', // editor line highlight background color
'editorLineNumber.foreground': '#ffffff', // editor line number color 'editorLineNumber.foreground': '#ffffff', // editor line number color
'editorCursor.foreground': '#ffffff', // editor cursor color 'editorCursor.foreground': '#ffffff', // editor cursor color
......
...@@ -1047,7 +1047,7 @@ CREATE TABLE `dinky_metrics` ( ...@@ -1047,7 +1047,7 @@ CREATE TABLE `dinky_metrics` (
`position` int(11) DEFAULT NULL COMMENT 'position', `position` int(11) DEFAULT NULL COMMENT 'position',
`show_type` varchar(255) DEFAULT NULL COMMENT 'show type', `show_type` varchar(255) DEFAULT NULL COMMENT 'show type',
`show_size` varchar(255) DEFAULT NULL COMMENT 'show size', `show_size` varchar(255) DEFAULT NULL COMMENT 'show size',
`title` varchar(255) DEFAULT NULL COMMENT 'title', `title` longtext DEFAULT NULL COMMENT 'title',
`layout_name` varchar(255) DEFAULT NULL COMMENT 'layout name', `layout_name` varchar(255) DEFAULT NULL COMMENT 'layout name',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'create time', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'create time',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'update time', `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'update time',
......
...@@ -1975,7 +1975,7 @@ CREATE TABLE "public"."dinky_metrics" ( ...@@ -1975,7 +1975,7 @@ CREATE TABLE "public"."dinky_metrics" (
"position" int4, "position" int4,
"show_type" varchar(255) COLLATE "pg_catalog"."default", "show_type" varchar(255) COLLATE "pg_catalog"."default",
"show_size" varchar(255) COLLATE "pg_catalog"."default", "show_size" varchar(255) COLLATE "pg_catalog"."default",
"title" varchar(255) COLLATE "pg_catalog"."default", "title" text COLLATE "pg_catalog"."default",
"layout_name" varchar(255) COLLATE "pg_catalog"."default", "layout_name" varchar(255) COLLATE "pg_catalog"."default",
"create_time" timestamp(6) NOT null, "create_time" timestamp(6) NOT null,
"update_time" timestamp(6) NOT null, "update_time" timestamp(6) NOT null,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment