Browse Source

reset & migration of db

b_fix
crunch 3 weeks ago
parent
commit
675d06f30a
4 changed files with 80 additions and 1 deletions
  1. +43
    -0
      prisma/migrations/20200827005830-reset/README.md
  2. +18
    -0
      prisma/migrations/20200827005830-reset/schema.prisma
  3. +17
    -0
      prisma/migrations/20200827005830-reset/steps.json
  4. +2
    -1
      prisma/migrations/migrate.lock

+ 43
- 0
prisma/migrations/20200827005830-reset/README.md View File

@@ -0,0 +1,43 @@
# Migration `20200827005830-reset`

This migration has been generated by crunch at 8/27/2020, 2:58:30 AM.
You can check out the [state of the schema](./schema.prisma) after the migration.

## Database Steps

```sql
CREATE TABLE "foxbase-todos"."Topic" (
"id" SERIAL,
"title" text NOT NULL ,
"description" text ,
PRIMARY KEY ("id")
)
```

## Changes

```diff
diff --git schema.prisma schema.prisma
migration 20200826104917-init..20200827005830-reset
--- datamodel.dml
+++ datamodel.dml
@@ -2,17 +2,17 @@
// learn more about it in the docs: https://pris.ly/d/prisma-schema
datasource db {
provider = "postgresql"
- url = "***"
+ url = "***"
}
generator client {
provider = "prisma-client-js"
}
model Topic {
id Int @default(autoincrement()) @id
- title String?
- description String
+ title String
+ description String?
}
```



+ 18
- 0
prisma/migrations/20200827005830-reset/schema.prisma View File

@@ -0,0 +1,18 @@
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

datasource db {
provider = "postgresql"
url = "***"
}

generator client {
provider = "prisma-client-js"
}

model Topic {
id Int @default(autoincrement()) @id
title String
description String?
}


+ 17
- 0
prisma/migrations/20200827005830-reset/steps.json View File

@@ -0,0 +1,17 @@
{
"version": "0.3.14-fixed",
"steps": [
{
"tag": "UpdateField",
"model": "Topic",
"field": "title",
"arity": "Required"
},
{
"tag": "UpdateField",
"model": "Topic",
"field": "description",
"arity": "Optional"
}
]
}

+ 2
- 1
prisma/migrations/migrate.lock View File

@@ -1,3 +1,4 @@
# Prisma Migrate lockfile v1

20200826104917-init
20200826104917-init
20200827005830-reset

Loading…
Cancel
Save