19 lines
677 B
SQL
19 lines
677 B
SQL
-- Migration: add Application table
|
|
|
|
CREATE TABLE IF NOT EXISTS "Application" (
|
|
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
"code" varchar(100) NOT NULL UNIQUE,
|
|
"name" varchar(255) NOT NULL,
|
|
"description" text,
|
|
"icon" text,
|
|
"url" text,
|
|
"applicationsClaim" varchar(255) NOT NULL UNIQUE,
|
|
"isActive" boolean NOT NULL DEFAULT true,
|
|
"displayOrder" integer NOT NULL DEFAULT 0,
|
|
"createdAt" timestamptz NOT NULL DEFAULT now(),
|
|
"updatedAt" timestamptz NOT NULL DEFAULT now()
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS "Application_code_idx" ON "Application" ("code");
|
|
CREATE INDEX IF NOT EXISTS "Application_applicationsClaim_idx" ON "Application" ("applicationsClaim");
|