The Open Source DocuSign Alternative.
TypeScript digital-signaturedocument-signingdocusign-alternativee-signatureesignesignaturenext-authnextjsopen-sourcepades-standardpdfpdf-signpdf-signaturepostgresqlprismaself-hostedsigningtypescript
prisma and user model
Timur Ercane10b04b9a79e
diff --git a/.env b/.envnew file mode 100644index 000000000..f9fd3b620--- /dev/null+++ b/.env@@ -0,0 +1,7 @@+# Environment variables declared in this file are automatically made available to Prisma.+# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema++# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.+# See the documentation for all the connection string options: https://pris.ly/d/connection-strings++DATABASE_URL="postgresql://postgres:postgres@localhost:5432/documenso_live?schema=public"\ No newline at end of filediff --git a/package-lock.json b/package-lock.jsonindex 40a6e525a..4f22e3b47 100644--- a/package-lock.json+++ b/package-lock.json@@ -8,6 +8,7 @@"name": "documenso","version": "0.1.0","dependencies": {+ "@prisma/client": "^4.6.1","@types/node": "18.11.9","@types/react": "18.0.25","@types/react-dom": "18.0.9",@@ -17,6 +18,9 @@"react": "18.2.0","react-dom": "18.2.0","typescript": "4.8.4"+ },+ "devDependencies": {+ "prisma": "^4.6.1"}},"node_modules/@babel/runtime": {@@ -334,6 +338,38 @@"node": ">= 8"}},+ "node_modules/@prisma/client": {+ "version": "4.6.1",+ "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.6.1.tgz",+ "integrity": "sha512-M1+NNrMzqaOIxT7PBGcTs3IZo7d1EW/+gVQd4C4gUgWBDGgD9AcIeZnUSidgWClmpMSgVUdnVORjsWWGUameYA==",+ "hasInstallScript": true,+ "dependencies": {+ "@prisma/engines-version": "4.6.1-3.694eea289a8462c80264df36757e4fdc129b1b32"+ },+ "engines": {+ "node": ">=14.17"+ },+ "peerDependencies": {+ "prisma": "*"+ },+ "peerDependenciesMeta": {+ "prisma": {+ "optional": true+ }+ }+ },+ "node_modules/@prisma/engines": {+ "version": "4.6.1",+ "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.6.1.tgz",+ "integrity": "sha512-3u2/XxvxB+Q7cMXHnKU0CpBiUK1QWqpgiBv28YDo1zOIJE3FCF8DI2vrp6vuwjGt5h0JGXDSvmSf4D4maVjJdw==",+ "devOptional": true,+ "hasInstallScript": true+ },+ "node_modules/@prisma/engines-version": {+ "version": "4.6.1-3.694eea289a8462c80264df36757e4fdc129b1b32",+ "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.6.1-3.694eea289a8462c80264df36757e4fdc129b1b32.tgz",+ "integrity": "sha512-HUCmkXAU2jqp2O1RvNtbE+seLGLyJGEABZS/R38rZjSAafAy0WzBuHq+tbZMnD+b5OSCsTVtIPVcuvx1ySxcWQ=="+ },"node_modules/@rushstack/eslint-patch": {"version": "1.2.0","resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.2.0.tgz",@@ -2340,6 +2376,23 @@"node": ">= 0.8.0"}},+ "node_modules/prisma": {+ "version": "4.6.1",+ "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.6.1.tgz",+ "integrity": "sha512-BR4itMCuzrDV4tn3e2TF+nh1zIX/RVU0isKtKoN28ADeoJ9nYaMhiuRRkFd2TZN8+l/XfYzoRKyHzUFXLQhmBQ==",+ "devOptional": true,+ "hasInstallScript": true,+ "dependencies": {+ "@prisma/engines": "4.6.1"+ },+ "bin": {+ "prisma": "build/index.js",+ "prisma2": "build/index.js"+ },+ "engines": {+ "node": ">=14.17"+ }+ },"node_modules/prop-types": {"version": "15.8.1","resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",@@ -3049,6 +3102,25 @@"fastq": "^1.6.0"}},+ "@prisma/client": {+ "version": "4.6.1",+ "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.6.1.tgz",+ "integrity": "sha512-M1+NNrMzqaOIxT7PBGcTs3IZo7d1EW/+gVQd4C4gUgWBDGgD9AcIeZnUSidgWClmpMSgVUdnVORjsWWGUameYA==",+ "requires": {+ "@prisma/engines-version": "4.6.1-3.694eea289a8462c80264df36757e4fdc129b1b32"+ }+ },+ "@prisma/engines": {+ "version": "4.6.1",+ "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.6.1.tgz",+ "integrity": "sha512-3u2/XxvxB+Q7cMXHnKU0CpBiUK1QWqpgiBv28YDo1zOIJE3FCF8DI2vrp6vuwjGt5h0JGXDSvmSf4D4maVjJdw==",+ "devOptional": true+ },+ "@prisma/engines-version": {+ "version": "4.6.1-3.694eea289a8462c80264df36757e4fdc129b1b32",+ "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.6.1-3.694eea289a8462c80264df36757e4fdc129b1b32.tgz",+ "integrity": "sha512-HUCmkXAU2jqp2O1RvNtbE+seLGLyJGEABZS/R38rZjSAafAy0WzBuHq+tbZMnD+b5OSCsTVtIPVcuvx1ySxcWQ=="+ },"@rushstack/eslint-patch": {"version": "1.2.0","resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.2.0.tgz",@@ -4461,6 +4533,15 @@"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz","integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g=="},+ "prisma": {+ "version": "4.6.1",+ "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.6.1.tgz",+ "integrity": "sha512-BR4itMCuzrDV4tn3e2TF+nh1zIX/RVU0isKtKoN28ADeoJ9nYaMhiuRRkFd2TZN8+l/XfYzoRKyHzUFXLQhmBQ==",+ "devOptional": true,+ "requires": {+ "@prisma/engines": "4.6.1"+ }+ },"prop-types": {"version": "15.8.1","resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",diff --git a/package.json b/package.jsonindex 7ee2fb53e..06d9b68e0 100644--- a/package.json+++ b/package.json@@ -9,6 +9,7 @@"lint": "next lint"},"dependencies": {+ "@prisma/client": "^4.6.1","@types/node": "18.11.9","@types/react": "18.0.25","@types/react-dom": "18.0.9",@@ -18,5 +19,8 @@"react": "18.2.0","react-dom": "18.2.0","typescript": "4.8.4"+ },+ "devDependencies": {+ "prisma": "^4.6.1"}}diff --git a/prisma/migrations/20221115095021_user_model/migration.sql b/prisma/migrations/20221115095021_user_model/migration.sqlnew file mode 100644index 000000000..1dc058c77--- /dev/null+++ b/prisma/migrations/20221115095021_user_model/migration.sql@@ -0,0 +1,8 @@+-- CreateTable+CREATE TABLE "user" (+ "id" SERIAL NOT NULL,+ "email" TEXT NOT NULL,+ "password" TEXT NOT NULL,++ CONSTRAINT "user_pkey" PRIMARY KEY ("id")+);diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.tomlnew file mode 100644index 000000000..fbffa92c2--- /dev/null+++ b/prisma/migrations/migration_lock.toml@@ -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"\ No newline at end of filediff --git a/prisma/schema.prisma b/prisma/schema.prismanew file mode 100644index 000000000..fdaf6c59a--- /dev/null+++ b/prisma/schema.prisma@@ -0,0 +1,14 @@+generator client {+ provider = "prisma-client-js"+}++datasource db {+ provider = "postgresql"+ url = env("DATABASE_URL")+}++model user {+ id Int @id @default(autoincrement())+ email String+ password String+}