Actualizar database-types.ts #27
@@ -0,0 +1,41 @@
|
|||||||
|
name: Update database types
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
|
||||||
|
PROJECT_REF: ${{ secrets.SUPABASE_PROJECT_ID }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
|
||||||
|
- run: npm run update-types
|
||||||
|
|
||||||
|
- name: Check for changes
|
||||||
|
id: git_status
|
||||||
|
run: |
|
||||||
|
echo "status=$(git status -s)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Commit changes
|
||||||
|
if: ${{ contains(steps.git_status.outputs.status, ' ') }}
|
||||||
|
run: |
|
||||||
|
git add supabase/functions/_shared/database.types.ts
|
||||||
|
git config user.email "ci@gitea.local"
|
||||||
|
git config user.name "gitea-actions"
|
||||||
|
git commit -m "Update database types"
|
||||||
|
|
||||||
|
- name: Push changes
|
||||||
|
if: ${{ contains(steps.git_status.outputs.status, ' ') }}
|
||||||
|
run: git push
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
export type Json =
|
export type Json =
|
||||||
| string
|
| string
|
||||||
| number
|
| number
|
||||||
| boolean
|
| boolean
|
||||||
|
|||||||
@@ -1,43 +1,7 @@
|
|||||||
drop view if exists "public"."plantilla_asignatura";
|
|
||||||
|
|
||||||
alter table "public"."asignaturas" drop column "criterios_de_evaluacion";
|
|
||||||
|
|
||||||
create or replace view "public"."plantilla_asignatura" as SELECT asignaturas.id AS asignatura_id,
|
|
||||||
struct.id AS estructura_id,
|
|
||||||
struct.template_id
|
|
||||||
FROM (public.asignaturas
|
|
||||||
JOIN public.estructuras_asignatura struct ON ((asignaturas.estructura_id = struct.id)));
|
|
||||||
|
|
||||||
|
|
||||||
grant delete on table "public"."asignatura_mensajes_ia" to "postgres";
|
|
||||||
|
|
||||||
grant insert on table "public"."asignatura_mensajes_ia" to "postgres";
|
|
||||||
|
|
||||||
grant references on table "public"."asignatura_mensajes_ia" to "postgres";
|
|
||||||
|
|
||||||
grant select on table "public"."asignatura_mensajes_ia" to "postgres";
|
|
||||||
|
|
||||||
grant trigger on table "public"."asignatura_mensajes_ia" to "postgres";
|
|
||||||
|
|
||||||
grant truncate on table "public"."asignatura_mensajes_ia" to "postgres";
|
|
||||||
|
|
||||||
grant update on table "public"."asignatura_mensajes_ia" to "postgres";
|
|
||||||
|
|
||||||
grant delete on table "public"."plan_mensajes_ia" to "postgres";
|
|
||||||
|
|
||||||
grant insert on table "public"."plan_mensajes_ia" to "postgres";
|
|
||||||
|
|
||||||
grant references on table "public"."plan_mensajes_ia" to "postgres";
|
|
||||||
|
|
||||||
grant select on table "public"."plan_mensajes_ia" to "postgres";
|
|
||||||
|
|
||||||
grant trigger on table "public"."plan_mensajes_ia" to "postgres";
|
|
||||||
|
|
||||||
grant truncate on table "public"."plan_mensajes_ia" to "postgres";
|
|
||||||
|
|
||||||
grant update on table "public"."plan_mensajes_ia" to "postgres";
|
|
||||||
|
|
||||||
|
|
||||||
alter publication supabase_realtime add table asignatura_mensajes_ia;
|
alter publication supabase_realtime add table asignatura_mensajes_ia;
|
||||||
|
|
||||||
alter publication supabase_realtime add table plan_mensajes_ia;
|
alter publication supabase_realtime add table plan_mensajes_ia;
|
||||||
|
|
||||||
|
alter publication supabase_realtime add table asignaturas;
|
||||||
|
|
||||||
|
alter publication supabase_realtime add table planes_estudio;
|
||||||
+217
-79
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user