chore: stop when generated column found

This commit is contained in:
Acid Chicken (硫酸鶏) 2024-06-03 17:19:53 +09:00
parent 42b055e58b
commit 18f5fb9cef
No known key found for this signature in database
GPG Key ID: 3E87B98A3F6BAB99
1 changed files with 4 additions and 0 deletions

View File

@ -104,6 +104,10 @@ export const miRepository = {
},
createTableColumnNamesWithPrimaryKey(queryBuilder) {
const columnNames = this.createTableColumnNames(queryBuilder);
if (this.metadata.columns.filter((column) => column.isGenerated).length) {
console.log(this.metadata.columns);
throw null;
}
if (!columnNames.includes('id')) {
columnNames.unshift('id');
}