You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
494 B
10 lines
494 B
CREATE TABLE "programacion_jukebox" (
|
|
"usuario_id" text PRIMARY KEY REFERENCES "usuario"("id") ON DELETE CASCADE,
|
|
"zona_horaria" text NOT NULL DEFAULT 'Europe/Madrid',
|
|
"franjas" jsonb NOT NULL DEFAULT '[]'::jsonb,
|
|
"revision" integer NOT NULL DEFAULT 1,
|
|
"actualizada_en" timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
CONSTRAINT "programacion_jukebox_franjas_array" CHECK (jsonb_typeof("franjas") = 'array'),
|
|
CONSTRAINT "programacion_jukebox_revision_positiva" CHECK ("revision" > 0)
|
|
);
|