29 lines
1.2 KiB
SQL
29 lines
1.2 KiB
SQL
-- Table: public.estados_articulos
|
|
|
|
CREATE TABLE IF NOT EXISTS public.estados_articulos
|
|
(
|
|
id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ),
|
|
nombre character varying(50) COLLATE pg_catalog."default" NOT NULL,
|
|
descripcion character varying(200) COLLATE pg_catalog."default",
|
|
color character varying(20) COLLATE pg_catalog."default" DEFAULT 'secondary'::character varying,
|
|
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 estados_articulos_pkey PRIMARY KEY (id)
|
|
)
|
|
TABLESPACE pg_default;
|
|
|
|
ALTER TABLE IF EXISTS public.estados_articulos
|
|
OWNER to postgres;
|
|
|
|
-- Index: ix_estados_articulos_nombre
|
|
|
|
-- DROP INDEX IF EXISTS public.ix_estados_articulos_nombre;
|
|
|
|
CREATE INDEX IF NOT EXISTS ix_estados_articulos_nombre
|
|
ON public.estados_articulos USING btree
|
|
(nombre COLLATE pg_catalog."default" ASC NULLS LAST)
|
|
TABLESPACE pg_default;
|