style(scripts): format schema generator to satisfy biome check
This commit is contained in:
1 parent
22d455da7a
commit
14a3de0f2a
1 file changed
+5
-4
@@ -137,9 +137,7 @@ function parseTableBody(name, table, body, extras) {
|
||||
if (pk) {
|
||||
ids = [...pk[1].matchAll(/t\.(\w+)/g)].map((m) => m[1]);
|
||||
}
|
||||
for (const u of extras.matchAll(
|
||||
/uniqueIndex\([^)]*\)\.on\(([^)]+)\)/g,
|
||||
)) {
|
||||
for (const u of extras.matchAll(/uniqueIndex\([^)]*\)\.on\(([^)]+)\)/g)) {
|
||||
uniques.push([...u[1].matchAll(/t\.(\w+)/g)].map((m) => m[1]));
|
||||
}
|
||||
}
|
||||
@@ -356,7 +354,10 @@ function modifiers(field, dbCol) {
|
||||
function emitDefault(field, dbCol) {
|
||||
const content = field.defaultContent;
|
||||
if (!content) return "";
|
||||
if (content === "sql`CURRENT_TIMESTAMP`" || content.includes("CURRENT_TIMESTAMP")) {
|
||||
if (
|
||||
content === "sql`CURRENT_TIMESTAMP`" ||
|
||||
content.includes("CURRENT_TIMESTAMP")
|
||||
) {
|
||||
markSqlUsed();
|
||||
return `.default(sql\`CURRENT_TIMESTAMP\`)`;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user