new(core.gbapp): LLM alerts for data.
This commit is contained in:
parent
2abb498158
commit
caf1601567
1 changed files with 11 additions and 1 deletions
|
@ -2955,7 +2955,17 @@ export class SystemKeywords {
|
|||
const schema = {};
|
||||
Object.keys(columns).forEach(col => {
|
||||
const columnType = columns[col].type;
|
||||
schema[col] = mapToSQLiteType(columnType); // Map source type to SQLite type
|
||||
|
||||
// Map source type to SQLite type
|
||||
schema[col] = {
|
||||
type: mapToSQLiteType(columnType)
|
||||
};
|
||||
|
||||
// If the column is named 'id' or 'Id', set it as the primary key
|
||||
if (col.toLowerCase() === 'id') {
|
||||
schema[col].primaryKey = true;
|
||||
schema[col].autoIncrement = true; // Optional: auto-increment for primary key
|
||||
}
|
||||
});
|
||||
|
||||
// Define the model dynamically for each table in SQLite
|
||||
|
|
Loading…
Add table
Reference in a new issue