Skip to content

Commit

Permalink
Add init migration.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelowolfsmartindustries committed Nov 1, 2023
1 parent aead727 commit 3aa990b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
27 changes: 27 additions & 0 deletions data/prisma/migrations/20231101221053_init/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-- CreateTable
CREATE TABLE "Students" (
"id" SERIAL NOT NULL,
"number" TEXT NOT NULL,
"name" TEXT NOT NULL,
"city" TEXT NOT NULL,
"birthday" TEXT NOT NULL,

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

-- CreateTable
CREATE TABLE "Users" (
"id" TEXT NOT NULL,
"name" VARCHAR(255) NOT NULL,
"email" TEXT NOT NULL,
"password" TEXT NOT NULL,
"isAdmin" BOOLEAN NOT NULL DEFAULT false,

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

-- CreateIndex
CREATE UNIQUE INDEX "Students_number_key" ON "Students"("number");

-- CreateIndex
CREATE UNIQUE INDEX "Users_email_key" ON "Users"("email");
3 changes: 3 additions & 0 deletions data/prisma/migrations/migration_lock.toml
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"

0 comments on commit 3aa990b

Please sign in to comment.