Files
base/database/migrations/20260103095921.sql
2026-04-10 18:25:21 +03:30

22 lines
768 B
SQL

-- Create "cache_hash" table
CREATE TABLE "public"."cache_hash" (
"key" text NOT NULL,
"field" text NOT NULL,
"value" jsonb NOT NULL,
"created_at" timestamptz NOT NULL DEFAULT now(),
"expires_at" timestamptz NULL,
PRIMARY KEY ("key", "field")
);
-- Create index "idx_cache_hash_expires_at" to table: "cache_hash"
CREATE INDEX "idx_cache_hash_expires_at" ON "public"."cache_hash" ("expires_at");
-- Create "cache_kv" table
CREATE TABLE "public"."cache_kv" (
"key" text NOT NULL,
"value" jsonb NOT NULL,
"created_at" timestamptz NOT NULL DEFAULT now(),
"expires_at" timestamptz NULL,
PRIMARY KEY ("key")
);
-- Create index "idx_cache_kv_expires_at" to table: "cache_kv"
CREATE INDEX "idx_cache_kv_expires_at" ON "public"."cache_kv" ("expires_at");