fix: update type generation script and modify database types structure
This commit is contained in:
@@ -20,9 +20,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Verify generated types are checked in
|
- name: Verify generated types are checked in
|
||||||
run: |
|
run: |
|
||||||
supabase gen types typescript --local > types.gen.ts
|
supabase gen types typescript --local > database-types.ts
|
||||||
if ! git diff --ignore-space-at-eol --exit-code --quiet types.gen.ts; then
|
if ! git diff --ignore-space-at-eol --exit-code --quiet database-types.ts; then
|
||||||
echo "Detected uncommitted changes after build. See status below:"
|
echo "Detected uncommitted changes after build. See status below:"
|
||||||
git diff
|
git diff
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
+131
-11
@@ -88,12 +88,10 @@ export type Database = {
|
|||||||
asignatura_hash: string | null
|
asignatura_hash: string | null
|
||||||
codigo: string | null
|
codigo: string | null
|
||||||
contenido_tematico: Json
|
contenido_tematico: Json
|
||||||
conversation_id: string | null
|
|
||||||
creado_en: string
|
creado_en: string
|
||||||
creado_por: string | null
|
creado_por: string | null
|
||||||
creditos: number
|
creditos: number
|
||||||
datos: Json
|
datos: Json
|
||||||
estado: Database["public"]["Enums"]["estado_asignatura"]
|
|
||||||
estructura_id: string | null
|
estructura_id: string | null
|
||||||
horas_academicas: number | null
|
horas_academicas: number | null
|
||||||
horas_independientes: number | null
|
horas_independientes: number | null
|
||||||
@@ -113,12 +111,10 @@ export type Database = {
|
|||||||
asignatura_hash?: string | null
|
asignatura_hash?: string | null
|
||||||
codigo?: string | null
|
codigo?: string | null
|
||||||
contenido_tematico?: Json
|
contenido_tematico?: Json
|
||||||
conversation_id?: string | null
|
|
||||||
creado_en?: string
|
creado_en?: string
|
||||||
creado_por?: string | null
|
creado_por?: string | null
|
||||||
creditos: number
|
creditos: number
|
||||||
datos?: Json
|
datos?: Json
|
||||||
estado?: Database["public"]["Enums"]["estado_asignatura"]
|
|
||||||
estructura_id?: string | null
|
estructura_id?: string | null
|
||||||
horas_academicas?: number | null
|
horas_academicas?: number | null
|
||||||
horas_independientes?: number | null
|
horas_independientes?: number | null
|
||||||
@@ -138,12 +134,10 @@ export type Database = {
|
|||||||
asignatura_hash?: string | null
|
asignatura_hash?: string | null
|
||||||
codigo?: string | null
|
codigo?: string | null
|
||||||
contenido_tematico?: Json
|
contenido_tematico?: Json
|
||||||
conversation_id?: string | null
|
|
||||||
creado_en?: string
|
creado_en?: string
|
||||||
creado_por?: string | null
|
creado_por?: string | null
|
||||||
creditos?: number
|
creditos?: number
|
||||||
datos?: Json
|
datos?: Json
|
||||||
estado?: Database["public"]["Enums"]["estado_asignatura"]
|
|
||||||
estructura_id?: string | null
|
estructura_id?: string | null
|
||||||
horas_academicas?: number | null
|
horas_academicas?: number | null
|
||||||
horas_independientes?: number | null
|
horas_independientes?: number | null
|
||||||
@@ -392,6 +386,135 @@ export type Database = {
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
conversaciones_asignatura: {
|
||||||
|
Row: {
|
||||||
|
archivado_en: string | null
|
||||||
|
archivado_por: string | null
|
||||||
|
asignatura_id: string
|
||||||
|
conversacion_json: Json
|
||||||
|
creado_en: string
|
||||||
|
creado_por: string | null
|
||||||
|
estado: Database["public"]["Enums"]["estado_conversacion"]
|
||||||
|
id: string
|
||||||
|
intento_archivado: number
|
||||||
|
openai_conversation_id: string
|
||||||
|
}
|
||||||
|
Insert: {
|
||||||
|
archivado_en?: string | null
|
||||||
|
archivado_por?: string | null
|
||||||
|
asignatura_id: string
|
||||||
|
conversacion_json?: Json
|
||||||
|
creado_en?: string
|
||||||
|
creado_por?: string | null
|
||||||
|
estado?: Database["public"]["Enums"]["estado_conversacion"]
|
||||||
|
id?: string
|
||||||
|
intento_archivado?: number
|
||||||
|
openai_conversation_id: string
|
||||||
|
}
|
||||||
|
Update: {
|
||||||
|
archivado_en?: string | null
|
||||||
|
archivado_por?: string | null
|
||||||
|
asignatura_id?: string
|
||||||
|
conversacion_json?: Json
|
||||||
|
creado_en?: string
|
||||||
|
creado_por?: string | null
|
||||||
|
estado?: Database["public"]["Enums"]["estado_conversacion"]
|
||||||
|
id?: string
|
||||||
|
intento_archivado?: number
|
||||||
|
openai_conversation_id?: string
|
||||||
|
}
|
||||||
|
Relationships: [
|
||||||
|
{
|
||||||
|
foreignKeyName: "conversaciones_asignatura_archivado_por_fkey"
|
||||||
|
columns: ["archivado_por"]
|
||||||
|
isOneToOne: false
|
||||||
|
referencedRelation: "usuarios_app"
|
||||||
|
referencedColumns: ["id"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
foreignKeyName: "conversaciones_asignatura_asignatura_id_fkey"
|
||||||
|
columns: ["asignatura_id"]
|
||||||
|
isOneToOne: false
|
||||||
|
referencedRelation: "asignaturas"
|
||||||
|
referencedColumns: ["id"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
foreignKeyName: "conversaciones_asignatura_creado_por_fkey"
|
||||||
|
columns: ["creado_por"]
|
||||||
|
isOneToOne: false
|
||||||
|
referencedRelation: "usuarios_app"
|
||||||
|
referencedColumns: ["id"]
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
conversaciones_plan: {
|
||||||
|
Row: {
|
||||||
|
archivado_en: string | null
|
||||||
|
archivado_por: string | null
|
||||||
|
conversacion_json: Json | null
|
||||||
|
creado_en: string
|
||||||
|
creado_por: string | null
|
||||||
|
estado: Database["public"]["Enums"]["estado_conversacion"]
|
||||||
|
id: string
|
||||||
|
intento_archivado: number
|
||||||
|
openai_conversation_id: string
|
||||||
|
plan_estudio_id: string
|
||||||
|
}
|
||||||
|
Insert: {
|
||||||
|
archivado_en?: string | null
|
||||||
|
archivado_por?: string | null
|
||||||
|
conversacion_json?: Json | null
|
||||||
|
creado_en?: string
|
||||||
|
creado_por?: string | null
|
||||||
|
estado?: Database["public"]["Enums"]["estado_conversacion"]
|
||||||
|
id?: string
|
||||||
|
intento_archivado?: number
|
||||||
|
openai_conversation_id: string
|
||||||
|
plan_estudio_id: string
|
||||||
|
}
|
||||||
|
Update: {
|
||||||
|
archivado_en?: string | null
|
||||||
|
archivado_por?: string | null
|
||||||
|
conversacion_json?: Json | null
|
||||||
|
creado_en?: string
|
||||||
|
creado_por?: string | null
|
||||||
|
estado?: Database["public"]["Enums"]["estado_conversacion"]
|
||||||
|
id?: string
|
||||||
|
intento_archivado?: number
|
||||||
|
openai_conversation_id?: string
|
||||||
|
plan_estudio_id?: string
|
||||||
|
}
|
||||||
|
Relationships: [
|
||||||
|
{
|
||||||
|
foreignKeyName: "conversaciones_plan_archivado_por_fkey"
|
||||||
|
columns: ["archivado_por"]
|
||||||
|
isOneToOne: false
|
||||||
|
referencedRelation: "usuarios_app"
|
||||||
|
referencedColumns: ["id"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
foreignKeyName: "conversaciones_plan_creado_por_fkey"
|
||||||
|
columns: ["creado_por"]
|
||||||
|
isOneToOne: false
|
||||||
|
referencedRelation: "usuarios_app"
|
||||||
|
referencedColumns: ["id"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
foreignKeyName: "conversaciones_plan_plan_estudio_id_fkey"
|
||||||
|
columns: ["plan_estudio_id"]
|
||||||
|
isOneToOne: false
|
||||||
|
referencedRelation: "planes_estudio"
|
||||||
|
referencedColumns: ["id"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
foreignKeyName: "conversaciones_plan_plan_estudio_id_fkey"
|
||||||
|
columns: ["plan_estudio_id"]
|
||||||
|
isOneToOne: false
|
||||||
|
referencedRelation: "plantilla_plan"
|
||||||
|
referencedColumns: ["plan_estudio_id"]
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
estados_plan: {
|
estados_plan: {
|
||||||
Row: {
|
Row: {
|
||||||
clave: string
|
clave: string
|
||||||
@@ -675,7 +798,6 @@ export type Database = {
|
|||||||
actualizado_en: string
|
actualizado_en: string
|
||||||
actualizado_por: string | null
|
actualizado_por: string | null
|
||||||
carrera_id: string
|
carrera_id: string
|
||||||
conversation_id: string | null
|
|
||||||
creado_en: string
|
creado_en: string
|
||||||
creado_por: string | null
|
creado_por: string | null
|
||||||
datos: Json
|
datos: Json
|
||||||
@@ -696,7 +818,6 @@ export type Database = {
|
|||||||
actualizado_en?: string
|
actualizado_en?: string
|
||||||
actualizado_por?: string | null
|
actualizado_por?: string | null
|
||||||
carrera_id: string
|
carrera_id: string
|
||||||
conversation_id?: string | null
|
|
||||||
creado_en?: string
|
creado_en?: string
|
||||||
creado_por?: string | null
|
creado_por?: string | null
|
||||||
datos?: Json
|
datos?: Json
|
||||||
@@ -717,7 +838,6 @@ export type Database = {
|
|||||||
actualizado_en?: string
|
actualizado_en?: string
|
||||||
actualizado_por?: string | null
|
actualizado_por?: string | null
|
||||||
carrera_id?: string
|
carrera_id?: string
|
||||||
conversation_id?: string | null
|
|
||||||
creado_en?: string
|
creado_en?: string
|
||||||
creado_por?: string | null
|
creado_por?: string | null
|
||||||
datos?: Json
|
datos?: Json
|
||||||
@@ -1087,7 +1207,7 @@ export type Database = {
|
|||||||
unaccent_immutable: { Args: { "": string }; Returns: string }
|
unaccent_immutable: { Args: { "": string }; Returns: string }
|
||||||
}
|
}
|
||||||
Enums: {
|
Enums: {
|
||||||
estado_asignatura: "borrador" | "revisada" | "aprobada" | "generando"
|
estado_conversacion: "ACTIVA" | "ARCHIVANDO" | "ARCHIVADA" | "ERROR"
|
||||||
estado_tarea_revision: "PENDIENTE" | "COMPLETADA" | "OMITIDA"
|
estado_tarea_revision: "PENDIENTE" | "COMPLETADA" | "OMITIDA"
|
||||||
fuente_cambio: "HUMANO" | "IA"
|
fuente_cambio: "HUMANO" | "IA"
|
||||||
nivel_plan_estudio:
|
nivel_plan_estudio:
|
||||||
@@ -1260,7 +1380,7 @@ export const Constants = {
|
|||||||
},
|
},
|
||||||
public: {
|
public: {
|
||||||
Enums: {
|
Enums: {
|
||||||
estado_asignatura: ["borrador", "revisada", "aprobada", "generando"],
|
estado_conversacion: ["ACTIVA", "ARCHIVANDO", "ARCHIVADA", "ERROR"],
|
||||||
estado_tarea_revision: ["PENDIENTE", "COMPLETADA", "OMITIDA"],
|
estado_tarea_revision: ["PENDIENTE", "COMPLETADA", "OMITIDA"],
|
||||||
fuente_cambio: ["HUMANO", "IA"],
|
fuente_cambio: ["HUMANO", "IA"],
|
||||||
nivel_plan_estudio: [
|
nivel_plan_estudio: [
|
||||||
|
|||||||
Reference in New Issue
Block a user