Skip to content

Commit

Permalink
new(core.gbapp): LLM alerts for data.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Oct 17, 2024
1 parent 02cecf6 commit bf51e33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/basic.gblib/services/SystemKeywords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2952,6 +2952,7 @@ export class SystemKeywords {

// Create a schema object for SQLite
const schema = {};
let pkAdded = false;
Object.keys(columns).forEach(col => {
const columnType = columns[col].type;

Expand All @@ -2961,8 +2962,9 @@ export class SystemKeywords {
};

// If the column is named 'id' or 'Id', set it as the primary key
if (col.toLowerCase() === 'id' || col.toLowerCase() === 'internal_id') {
if (! pkAdded && (col.toLowerCase() === 'id' || col.toLowerCase() === 'internal_id')) {
schema[col].primaryKey = true;
pkAdded = true;
}
});

Expand Down

0 comments on commit bf51e33

Please sign in to comment.