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.

2016112200.sql 635B

1234567891011121314151617181920212223
  1. DROP TABLE "cache";
  2. DROP TABLE "cache_shared";
  3. CREATE TABLE "cache" (
  4. "user_id" integer NOT NULL
  5. REFERENCES "users" ("user_id") ON DELETE CASCADE,
  6. "cache_key" varchar(128) NOT NULL,
  7. "expires" timestamp with time zone DEFAULT NULL,
  8. "data" long NOT NULL,
  9. PRIMARY KEY ("user_id", "cache_key")
  10. );
  11. CREATE INDEX "cache_expires_idx" ON "cache" ("expires");
  12. CREATE TABLE "cache_shared" (
  13. "cache_key" varchar(255) NOT NULL,
  14. "expires" timestamp with time zone DEFAULT NULL,
  15. "data" long NOT NULL,
  16. PRIMARY KEY ("cache_key")
  17. );
  18. CREATE INDEX "cache_shared_expires_idx" ON "cache_shared" ("expires");