Fix bugs, improve schema gen
This commit is contained in:
Vendored
+1
-1
@@ -58,12 +58,12 @@ async function createIndex({ table, index, config, }) {
|
||||
});
|
||||
return;
|
||||
}
|
||||
console.log(`Creating standard index: ${index.indexName}`);
|
||||
const fields = index.indexTableFields
|
||||
.map((field) => MariaDBQuoteGen(field))
|
||||
.join(", ");
|
||||
const typeUpper = index.indexType?.toUpperCase();
|
||||
const isSpecialType = typeUpper === "FULLTEXT" || typeUpper === "SPATIAL";
|
||||
console.log(`Creating ${isSpecialType ? typeUpper : "standard"} index: ${index.indexName}`);
|
||||
const indexPrefix = isSpecialType ? `${typeUpper} ` : "";
|
||||
const indexSuffix = !isSpecialType && (typeUpper === "BTREE" || typeUpper === "HASH")
|
||||
? ` USING ${typeUpper}`
|
||||
|
||||
Reference in New Issue
Block a user