-
setSdlMode(false)}
- >
- DDL
-
-
setSdlMode(true)}
- >
- SDL
+
+ {showSDLToggle ? (
+
+
setSdlMode(false)}
+ >
+ DDL
+
+
setSdlMode(true)}
+ >
+ SDL
+
-
- ) : null}
+ ) : null}
+
+
}
+ kind="outline"
+ onClick={closePanel}
+ />
+
-
}
- kind="outline"
- onClick={closePanel}
- >
- Close migrations
-
{history.children.length
@@ -995,10 +1005,9 @@ const MigrationsPanel = observer(function MigrationsPanel({
))
: null}
- {history.items.map((item) => {
- const code = sdlMode
- ? migrationScripts.get(item.name)?.sdl
- : migrationScripts.get(item.name)?.script;
+ {history.items.map((item, i) => {
+ const itemData = migrationScripts.get(item.name);
+ const code = sdlMode ? itemData?.sdl! : itemData?.script;
const body = (
- {item.parent == null ? line : null}
+ {item.parent == null && i !== 0 ? line : null}