Skip to content

Commit cf7fead

Browse files
committed
fix: support mysql in adminforth CLI
1 parent 84373d9 commit cf7fead

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

adminforth/commands/createApp/utils.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function checkNodeVersion(minRequiredVersion = 20) {
6464
if (isNaN(major) || major < minRequiredVersion) {
6565
throw new Error(
6666
`Node.js v${minRequiredVersion}+ is required. You have ${process.versions.node}. ` +
67-
`Please upgrade Node.js.`
67+
`Please upgrade Node.js. We recommend using nvm for managing multiple Node.js versions.`
6868
);
6969
}
7070
}
@@ -80,6 +80,8 @@ function detectDbProvider(protocol) {
8080
return 'postgresql';
8181
} else if (protocol.startsWith('mongodb')) {
8282
return 'mongodb';
83+
} else if (protocol.startsWith('mysql')) {
84+
return 'mysql';
8385
}
8486

8587
const message = `Unknown database provider for ${protocol}. Only SQLite, PostgreSQL, and MongoDB are supported now.`;

adminforth/spa/src/components/ShowTable.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
</template>
5656

5757
<script setup lang="ts">
58-
import { defineProps } from 'vue';
5958
import ValueRenderer from '@/components/ValueRenderer.vue';
6059
import { getCustomComponent } from '@/utils';
6160
import { useCoreStore } from '@/stores/core';

0 commit comments

Comments
 (0)