Skip to content

Commit

Permalink
feat: 🗃️ use postgresql
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosazaustre committed Jul 8, 2021
1 parent 51a48d7 commit 355aef6
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 13 deletions.
7 changes: 0 additions & 7 deletions .env

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"private": true,
"scripts": {
"dev": "next dev",
"prebuild": "prisma generate",
"build": "next build",
"start": "next start",
"lint": "eslint --ext js,jsx ."
Expand Down
Binary file removed prisma/database.db
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
-- CreateTable
CREATE TABLE "Link" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"id" SERIAL NOT NULL,
"url" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"shortUrl" TEXT NOT NULL,
"clicks" INTEGER NOT NULL DEFAULT 0
"clicks" INTEGER NOT NULL DEFAULT 0,

PRIMARY KEY ("id")
);

-- CreateIndex
Expand Down
2 changes: 1 addition & 1 deletion prisma/migrations/migration_lock.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "sqlite"
provider = "postgresql"
2 changes: 1 addition & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// learn more about it in the docs: https://pris.ly/d/prisma-schema

datasource db {
provider = "sqlite"
provider = "postgresql"
url = env("DATABASE_URL")
}

Expand Down

0 comments on commit 355aef6

Please sign in to comment.