orm: quote table and field name in [references] (#19387)

This commit is contained in:
asvln 2023-09-20 01:56:58 -04:00 committed by GitHub
parent cb9584fefe
commit 6d56639cc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -572,7 +572,7 @@ pub fn orm_table_gen(table string, q string, defaults bool, def_unique_len int,
unique_fields << f
}
if references_table != '' {
stmt += ' REFERENCES ${references_table} (${references_field})'
stmt += ' REFERENCES ${q}${references_table}${q}(${q}${references_field}${q})'
}
fs << stmt
}