Skip to content

Commit

Permalink
feat: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Zhang (张涛) committed May 23, 2024
1 parent 4521854 commit 14bf366
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"@commitlint/cli": "^19.2.1",
"@commitlint/config-conventional": "^19.1.0",
"husky": "^9.0.11",
"@prisma/client": "5.8.1"
"prisma": "5.8.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ CREATE TABLE "project" (
"description" TEXT NOT NULL,
"bu" TEXT NOT NULL,
"tag" TEXT NOT NULL,
"tags" JSONB NOT NULL,
"coverage" TEXT NOT NULL,
"default_branch" TEXT NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
Expand Down
113 changes: 113 additions & 0 deletions packages/canyon-backend/prisma/schema.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
-- CreateTable
CREATE TABLE "user" (
"id" INTEGER NOT NULL,
"username" TEXT NOT NULL,
"password" TEXT NOT NULL,
"nickname" TEXT NOT NULL,
"avatar" TEXT NOT NULL,
"refresh_token" TEXT NOT NULL,
"access_token" TEXT NOT NULL,
"email" TEXT NOT NULL,
"favor" TEXT NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

CONSTRAINT "user_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "Git" (
"id" TEXT NOT NULL,
"userID" TEXT NOT NULL,
"provider" TEXT NOT NULL,
"providerAccountId" TEXT NOT NULL,
"providerRefreshToken" TEXT NOT NULL,
"providerAccessToken" TEXT NOT NULL,
"providerScope" TEXT NOT NULL,
"loggedIn" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

CONSTRAINT "Git_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "GitProvider" (
"id" TEXT NOT NULL,
"url" TEXT NOT NULL,
"clientID" TEXT NOT NULL,
"clientSecret" TEXT NOT NULL,
"type" TEXT NOT NULL,
"name" TEXT NOT NULL,
"disabled" BOOLEAN NOT NULL,

CONSTRAINT "GitProvider_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "coverage" (
"id" TEXT NOT NULL,
"key" TEXT NOT NULL,
"sha" TEXT NOT NULL,
"branch" TEXT NOT NULL,
"compare_target" TEXT NOT NULL,
"provider" TEXT NOT NULL,
"project_id" TEXT NOT NULL,
"instrument_cwd" TEXT NOT NULL,
"reporter" TEXT NOT NULL,
"report_id" TEXT NOT NULL,
"cov_type" TEXT NOT NULL,
"relation_id" JSONB NOT NULL,
"summary" JSONB NOT NULL,
"tag" JSONB NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

CONSTRAINT "coverage_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "coveragedata" (
"id" TEXT NOT NULL,
"compresseddata" TEXT NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

CONSTRAINT "coveragedata_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "project" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"path_with_namespace" TEXT NOT NULL,
"description" TEXT NOT NULL,
"bu" TEXT NOT NULL,
"tag" TEXT NOT NULL,
"tags" JSONB NOT NULL,
"coverage" TEXT NOT NULL,
"default_branch" TEXT NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

CONSTRAINT "project_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "codechange" (
"id" TEXT NOT NULL,
"project_id" TEXT NOT NULL,
"compare_target" TEXT NOT NULL,
"sha" TEXT NOT NULL,
"path" TEXT NOT NULL,
"additions" INTEGER[],
"deletions" INTEGER[],
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

CONSTRAINT "codechange_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "distributedlock" (
"lockName" TEXT NOT NULL,
"isLocked" BOOLEAN NOT NULL DEFAULT false,
"lockTimestamp" TIMESTAMP(3),
"lockExpiration" TIMESTAMP(3),

CONSTRAINT "distributedlock_pkey" PRIMARY KEY ("lockName")
);

0 comments on commit 14bf366

Please sign in to comment.