- Agrega fn_log_cambios_planes_estudio y trigger para registrar cambios en cambios_plan, usando response_id (reemplaza interaccion_ia_id).
- Extiende planes_estudio con conversation_id (unique) y plan_hash; agrega asignatura_hash en asignaturas; corrige unaccent_immutable y añade extensión http.
- Actualiza seeds/backups (data_backup.sql / scheme_backup.sql) y ajusta script de diff (sql_para_local_como_remoto.sql), elimina el diff viejo y actualiza archivos auxiliares (deno.lock, CLI temp).
revert Merge pull request 'REFACTOR OpenAI service to manage env and convo creation' (#12) from issue/9-hacer-una-funcin-que-inserte-el-id-de-conversacin into main
Reviewed-on: AlexRG/genesis-2#12
- Add fromEnv factory to OpenAIService to handle env vars
- Move conversation creation into OpenAIService
- Update create- chat-conversation function to use new OpenAIService
methods
- Add CORS headers to responses
- Added imports for OpenAI and Zod in deno.json
- Updated deno.lock with new versions for OpenAI and Zod
- Introduced a sample PDF file demonstrating bookmark functionality
- Refactored ai-structured function to improve error handling and logging
- Updated tests to reflect changes in input structure and expected output
- Created multiple tables including 'asignaturas', 'carreras', 'planes_estudio', and others to manage academic entities.
- Defined various ENUM types for categorizing academic roles, task statuses, and notification types.
- Implemented triggers and functions for automatic timestamp updates and validation of cycle numbers in subjects.
- Established foreign key relationships to maintain data integrity across tables.
- Added necessary extensions for enhanced functionality, including 'pgsodium', 'pg_graphql', and 'pg_stat_statements'.
- Created connection URL for PostgreSQL in pooler-url file.
- Added PostgreSQL version information in postgres-version file.
- Included project reference in project-ref file.
- Specified REST API version in rest-version file.
- Documented storage migration details in storage-migration file.
- Defined storage version in storage-version file.
- Updated ai-structured function to include logging for EDGE function.
- Established a comprehensive schema.sql file with multiple tables, types, functions, triggers, and permissions for the application.
- Created .gitignore to exclude unnecessary files
- Added README.md with installation and usage instructions
- Initialized package.json with dependencies and configurations
- Set up tsconfig.json for TypeScript compiler options
- Implemented basic index.ts file for logging
- Added Supabase function structure in ai-structured directory
- Created test files for user authentication and function invocation