Skip to content

Commit b248847

Browse files
committed
fix remove db.raw
1 parent ba14ac2 commit b248847

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/runtime/server/utils/create-password-reset-tokens-table.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ export const createPasswordResetTokensTable = async (options: ModuleOptions) =>
1212
console.log(`[DB:Create Password Reset Tokens Table] Creating ${tableName} table with ${connectorName} connector...`)
1313

1414
await db.sql`
15-
CREATE TABLE IF NOT EXISTS ${db.raw(tableName)} (
15+
CREATE TABLE IF NOT EXISTS {${tableName}} (
1616
id INTEGER PRIMARY KEY AUTOINCREMENT,
1717
email TEXT NOT NULL,
1818
token TEXT NOT NULL UNIQUE,
1919
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
2020
)
2121
`
2222
// Creating an index on email for faster lookups
23-
await db.sql`CREATE INDEX IF NOT EXISTS idx_password_reset_tokens_email ON ${db.raw(tableName)} (email)`
23+
await db.sql`CREATE INDEX IF NOT EXISTS idx_password_reset_tokens_email ON {${tableName}} (email)`
2424
// Creating an index on token for faster lookups
25-
await db.sql`CREATE INDEX IF NOT EXISTS idx_password_reset_tokens_token ON ${db.raw(tableName)} (token)`
25+
await db.sql`CREATE INDEX IF NOT EXISTS idx_password_reset_tokens_token ON {${tableName}} (token)`
2626

2727
console.log(`[DB:Create Password Reset Tokens Table] ${tableName} table created successfully!`)
28-
console.log(`[DB:Create Password Reset Tokens Table] Fields: id, email, token, created_at`)
28+
console.log('[DB:Create Password Reset Tokens Table] Fields: id, email, token, created_at')
2929

3030
console.log('[DB:Create Password Reset Tokens Table] Migration completed successfully!')
3131
}

0 commit comments

Comments
 (0)