Files
RS_System/RS_system/Migrations/sql_ubicaciones.sql
2026-02-01 14:28:17 -06:00

29 lines
1.1 KiB
SQL

-- Table: public.ubicaciones
CREATE TABLE IF NOT EXISTS public.ubicaciones
(
id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ),
nombre character varying(100) COLLATE pg_catalog."default" NOT NULL,
descripcion character varying(200) COLLATE pg_catalog."default",
responsable character varying(100) COLLATE pg_catalog."default",
activo boolean NOT NULL DEFAULT true,
eliminado boolean NOT NULL DEFAULT false,
creado_en timestamp without time zone NOT NULL DEFAULT (now() AT TIME ZONE 'utc'::text),
actualizado_en timestamp without time zone NOT NULL DEFAULT (now() AT TIME ZONE 'utc'::text),
creado_por character varying(100) COLLATE pg_catalog."default",
CONSTRAINT ubicaciones_pkey PRIMARY KEY (id)
)
TABLESPACE pg_default;
ALTER TABLE IF EXISTS public.ubicaciones
OWNER to postgres;
-- Index: ix_ubicaciones_nombre
-- DROP INDEX IF EXISTS public.ix_ubicaciones_nombre;
CREATE INDEX IF NOT EXISTS ix_ubicaciones_nombre
ON public.ubicaciones USING btree
(nombre COLLATE pg_catalog."default" ASC NULLS LAST)
TABLESPACE pg_default;