31 lines
2.0 KiB
SQL
31 lines
2.0 KiB
SQL
alter type "public"."tipo_cambio" rename to "tipo_cambio__old_version_to_be_dropped";
|
|
|
|
create type "public"."tipo_cambio" as enum ('ACTUALIZACION_CAMPO', 'ACTUALIZACION_MAPA', 'TRANSICION_ESTADO', 'OTRO', 'CREACION');
|
|
|
|
alter table "public"."cambios_asignatura" alter column tipo type "public"."tipo_cambio" using tipo::text::"public"."tipo_cambio";
|
|
|
|
alter table "public"."cambios_plan" alter column tipo type "public"."tipo_cambio" using tipo::text::"public"."tipo_cambio";
|
|
|
|
drop type "public"."tipo_cambio__old_version_to_be_dropped";
|
|
|
|
set check_function_bodies = off;
|
|
|
|
create or replace view "public"."plantilla_plan" as SELECT plan.id AS plan_estudio_id,
|
|
struct.id AS estructura_id,
|
|
struct.template_id
|
|
FROM (public.planes_estudio plan
|
|
JOIN public.estructuras_plan struct ON ((plan.estructura_id = struct.id)));
|
|
|
|
|
|
CREATE OR REPLACE FUNCTION public.unaccent_immutable(text)
|
|
RETURNS text
|
|
LANGUAGE sql
|
|
IMMUTABLE PARALLEL SAFE STRICT
|
|
AS $function$
|
|
SELECT unaccent('unaccent', $1);
|
|
$function$
|
|
;
|
|
|
|
|
|
|