41 lines
1001 B
Markdown

# Migration `20201009145620-add-user-email`
This migration has been generated by Dm1tr1y147 at 10/9/2020, 7:56:20 PM.
You can check out the [state of the schema](./schema.prisma) after the migration.
## Database Steps
```sql
ALTER TABLE "public"."User" ADD COLUMN "email" text NOT NULL DEFAULT E'test@mail.com'
CREATE UNIQUE INDEX "User.email_unique" ON "public"."User"("email")
```
## Changes
```diff
diff --git schema.prisma schema.prisma
migration 20201007134933-fix-optional-values..20201009145620-add-user-email
--- datamodel.dml
+++ datamodel.dml
@@ -2,9 +2,9 @@
// learn more about it in the docs: https://pris.ly/d/prisma-schema
datasource db {
provider = "postgres"
- url = "***"
+ url = "***"
}
generator client {
provider = "prisma-client-js"
@@ -57,8 +57,9 @@
}
model User {
name String
+ email String @unique @default("test@mail.com")
forms Form[]
id Int @id @default(autoincrement())
formsSubmissions FormSubmission[]
```