Merge branch 'main' into issue/74-agregar-trigger-para-cambios-en-asignatura
Supa-backup / run_db_backup (pull_request) Successful in 43s
Deploy Function / deploy (pull_request) Successful in 25s
Deploy Migrations to Production / deploy (pull_request) Successful in 10s

This commit is contained in:
2026-03-18 22:06:57 +00:00
8 changed files with 14 additions and 5011 deletions
-31
View File
@@ -1,31 +0,0 @@
name: CI
on:
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Start Supabase local development setup
run: supabase db start
- name: Reset database to ensure a clean state
run: supabase db reset --no-seed
- name: Verify generated types are checked in
run: |
supabase gen types typescript --local > supabase/functions/_shared/database.types.ts
if ! git diff --ignore-space-at-eol --exit-code --quiet supabase/functions/_shared/database.types.ts; then
echo "Detected uncommitted changes after build. See diff below:"
git diff
exit 1
fi
-55
View File
@@ -1,55 +0,0 @@
name: Update database types
on:
push:
branches:
- main
paths:
- supabase/migrations/*.sql
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
env:
SUPABASE_ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
PROJECT_REF: ${{ secrets.SUPABASE_PROJECT_ID }}
DB_PASSWORD: ${{ secrets.SUPABASE_DB_PASSWORD }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Generate database types
run: |
supabase gen types typescript --local > supabase/functions/_shared/database.types.ts
- name: Check for changes
id: git_status
run: |
if [[ -n "$(git status --porcelain)" ]]; then
echo "changed=true" >> $GITEA_OUTPUT
else
echo "changed=false" >> $GITEA_OUTPUT
fi
- name: Commit changes
if: steps.git_status.outputs.changed == 'true'
run: |
git config user.name "supabot"
git config user.email "supabot@example.com"
git add supabase/functions/_shared/database.types.ts
git commit -m "chore: update database types"
- name: Push changes
if: steps.git_status.outputs.changed == 'true'
run: |
git pull
git push
@@ -22,11 +22,12 @@ jobs:
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Link supabase project
run: supabase link --project-ref $SUPABASE_PROJECT_ID
- name: Generar seed de supabase
run: |
supabase link --project-ref $SUPABASE_PROJECT_ID
supabase db dump -f supabase/seed.sql --data-only
run: supabase db dump -f supabase/seed.sql --data-only
- name: Generar tipos de supabase
run: supabase gen types typescript --schema public > supabase/functions/_shared/database.types.ts
- name: Check for changes
id: git_status
@@ -43,7 +44,8 @@ jobs:
git config user.name "supabot"
git config user.email "supabot@example.com"
git add supabase/seed.sql
git commit -m "chore: update database seed"
git add supabase/functions/_shared/database.types.ts
git commit -m "chore: update database seed & types"
- name: Push changes
if: steps.git_status.outputs.changed == 'true'
-2799
View File
File diff suppressed because one or more lines are too long
+5 -29
View File
@@ -1,4 +1,4 @@
export type Json =
export type Json =
| string
| number
| boolean
@@ -7,30 +7,10 @@
| Json[]
export type Database = {
graphql_public: {
Tables: {
[_ in never]: never
}
Views: {
[_ in never]: never
}
Functions: {
graphql: {
Args: {
extensions?: Json
operationName?: string
query?: string
variables?: Json
}
Returns: Json
}
}
Enums: {
[_ in never]: never
}
CompositeTypes: {
[_ in never]: never
}
// Allows to automatically instantiate createClient with right options
// instead of createClient<Database, { PostgrestVersion: 'XX' }>(URL, KEY)
__InternalSupabase: {
PostgrestVersion: "14.1"
}
public: {
Tables: {
@@ -1568,9 +1548,6 @@ export type CompositeTypes<
: never
export const Constants = {
graphql_public: {
Enums: {},
},
public: {
Enums: {
estado_asignatura: ["borrador", "revisada", "aprobada", "generando"],
@@ -1630,4 +1607,3 @@ export const Constants = {
},
},
} as const
-13
View File
@@ -1,13 +0,0 @@
SET default_transaction_read_only = off;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
ALTER ROLE "anon" SET "statement_timeout" TO '3s';
ALTER ROLE "authenticated" SET "statement_timeout" TO '8s';
ALTER ROLE "authenticator" SET "statement_timeout" TO '8s';
RESET ALL;
-2077
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -4,7 +4,7 @@ SET session_replication_role = replica;
-- PostgreSQL database dump
--
-- \restrict cjN2YYS2KAOqreW9LqhjpXqJRNIzCaVPnayxuuqhyMC8b4dch1tGVQLneKb1Oid
-- \restrict JtpN0pcWSvQQiDMZpeDxQumqbjV0WVDxKRJ4t9jRbYXAiev2sg7oCOaOGrRzVfV
-- Dumped from database version 17.6
-- Dumped by pg_dump version 17.6
@@ -2893,6 +2893,6 @@ SELECT pg_catalog.setval('"supabase_functions"."hooks_id_seq"', 11, true);
-- PostgreSQL database dump complete
--
-- \unrestrict cjN2YYS2KAOqreW9LqhjpXqJRNIzCaVPnayxuuqhyMC8b4dch1tGVQLneKb1Oid
-- \unrestrict JtpN0pcWSvQQiDMZpeDxQumqbjV0WVDxKRJ4t9jRbYXAiev2sg7oCOaOGrRzVfV
RESET ALL;