Quote enum type names in dev truncate-db DROP TYPE statements.
Matches DROP TABLE identifier quoting so reserved or mixed-case names drop safely.
This commit is contained in:
@@ -41,7 +41,7 @@ void (async () => {
|
||||
|
||||
for (const enumType of enums) {
|
||||
try {
|
||||
await initializedDataSource.query(`DROP TYPE IF EXISTS ${enumType.typname} CASCADE;`);
|
||||
await initializedDataSource.query(`DROP TYPE IF EXISTS "${enumType.typname}" CASCADE;`);
|
||||
|
||||
console.info(`Dropped enum: ${enumType.typname}`);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user