-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
173 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
DATABASE_URL="postgresql://admin:eipsfun@localhost:5335/eipsfun?schema=public" | ||
PORT=3100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
-- CreateEnum | ||
CREATE TYPE "EIPType" AS ENUM ('Standards Track', 'Meta', 'Informational'); | ||
|
||
-- CreateEnum | ||
CREATE TYPE "EIPCategory" AS ENUM ('Core', 'Networking', 'Interface', 'ERC'); | ||
|
||
-- CreateEnum | ||
CREATE TYPE "EIPStatus" AS ENUM ('Idea', 'Draft', 'Review', 'Last Call', 'Final', 'Stagnant', 'Withdrawn', 'Living'); | ||
|
||
-- CreateTable | ||
CREATE TABLE "EmailSubscribe" ( | ||
"id" SERIAL NOT NULL, | ||
"address" TEXT NOT NULL, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
|
||
CONSTRAINT "EmailSubscribe_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "EIPs" ( | ||
"id" SERIAL NOT NULL, | ||
"eip" INTEGER NOT NULL, | ||
"title" TEXT NOT NULL, | ||
"description" TEXT NOT NULL, | ||
"author" TEXT NOT NULL, | ||
"discussions_to" TEXT NOT NULL, | ||
"status" "EIPStatus" NOT NULL, | ||
"type" "EIPType" NOT NULL, | ||
"category" "EIPCategory", | ||
"created" TIMESTAMP(3) NOT NULL, | ||
"requires" INTEGER[], | ||
"last_call_deadline" TIMESTAMP(3), | ||
"withdrawal_reason" TEXT, | ||
"content" TEXT NOT NULL, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
|
||
CONSTRAINT "EIPs_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "EIPsSearch" ( | ||
"id" SERIAL NOT NULL, | ||
"eip" INTEGER NOT NULL, | ||
"subTitle" TEXT NOT NULL, | ||
"shortRead" TEXT NOT NULL, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
|
||
CONSTRAINT "EIPsSearch_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "EmailSubscribe_address_key" ON "EmailSubscribe"("address"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "EIPs_eip_key" ON "EIPs"("eip"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "EIPsSearch_eip_key" ON "EIPsSearch"("eip"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Please do not edit this file manually | ||
# It should be added in your version-control system (i.e. Git) | ||
provider = "postgresql" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
// This is your Prisma schema file, | ||
// learn more about it in the docs: https://pris.ly/d/prisma-schema | ||
|
||
generator client { | ||
provider = "prisma-client-js" | ||
} | ||
|
||
datasource db { | ||
provider = "postgresql" | ||
url = env("DATABASE_URL") | ||
} | ||
|
||
enum EIPType { | ||
Standards_Track @map("Standards Track") | ||
Meta | ||
Informational | ||
} | ||
|
||
enum EIPCategory { | ||
Core | ||
Networking | ||
Interface | ||
ERC | ||
} | ||
|
||
enum EIPStatus { | ||
Idea | ||
Draft | ||
Review | ||
Last_Call @map("Last Call") | ||
Final | ||
Stagnant | ||
Withdrawn | ||
Living | ||
} | ||
|
||
model EmailSubscribe { | ||
id Int @id @default(autoincrement()) | ||
address String @unique | ||
createdAt DateTime @default(now()) | ||
} | ||
|
||
model EIPs { | ||
id Int @id @default(autoincrement()) | ||
eip Int @unique | ||
title String | ||
description String | ||
author String | ||
discussions_to String | ||
status EIPStatus | ||
type EIPType | ||
category EIPCategory? | ||
created DateTime | ||
requires Int[] | ||
last_call_deadline DateTime? | ||
withdrawal_reason String? | ||
content String | ||
createdAt DateTime @default(now()) | ||
} | ||
|
||
model EIPsSearch { | ||
id Int @id @default(autoincrement()) | ||
eip Int @unique | ||
subTitle String | ||
shortRead String | ||
createdAt DateTime @default(now()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: '3.1' | ||
|
||
services: | ||
postgres-eipsfun: | ||
image: postgres:15 | ||
restart: always | ||
environment: | ||
- POSTGRES_USER=admin | ||
- POSTGRES_PASSWORD=eipsfun | ||
- POSTGRES_DB=eipsfun | ||
ports: | ||
- 5335:5432 | ||
volumes: | ||
- eipsfun-postgresql:/var/lib/postgresql/data | ||
|
||
volumes: | ||
eipsfun-postgresql: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -774,6 +774,18 @@ | |
consola "^2.15.0" | ||
node-fetch "^2.6.1" | ||
|
||
"@prisma/[email protected]": | ||
version "4.12.0" | ||
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-4.12.0.tgz#119b692888b1fe0fd3305c7d0e0ac48520aa6839" | ||
integrity sha512-j9/ighfWwux97J2dS15nqhl60tYoH8V0IuSsgZDb6bCFcQD3fXbXmxjYC8GHhIgOk3lB7Pq+8CwElz2MiDpsSg== | ||
dependencies: | ||
"@prisma/engines-version" "4.12.0-67.659ef412370fa3b41cd7bf6e94587c1dfb7f67e7" | ||
|
||
"@prisma/engines-version@4.12.0-67.659ef412370fa3b41cd7bf6e94587c1dfb7f67e7": | ||
version "4.12.0-67.659ef412370fa3b41cd7bf6e94587c1dfb7f67e7" | ||
resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-4.12.0-67.659ef412370fa3b41cd7bf6e94587c1dfb7f67e7.tgz#51a1cc5c886564b542acde64a873645d0dee2566" | ||
integrity sha512-JIHNj5jlXb9mcaJwakM0vpgRYJIAurxTUqM0iX0tfEQA5XLZ9ONkIckkhuAKdAzocZ+80GYg7QSsfpjg7OxbOA== | ||
|
||
"@prisma/[email protected]": | ||
version "4.12.0" | ||
resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-4.12.0.tgz#68d99078b70b2d9c339d0e8cbf2e99f00b72aa8c" | ||
|