new(core.gbapp): LLM alerts for data.

This commit is contained in:
me@rodrigorodriguez.com 2024-10-17 14:40:32 -03:00
parent 2abb498158
commit caf1601567

View file

@ -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