Norbert Takács
05/21/2022, 6:18 PMdatasource db {
provider = "sqlite"
url = "file:./../config/rss_bot_database.db"
}
model rss {
id Int @id @unique(map: "sqlite_autoindex_rss_1") @default(autoincrement())
link String @unique(map: "sqlite_autoindex_rss_2")
last String
name String @unique(map: "sqlite_autoindex_rss_3")
}
trying to move to this schema.
datasource db {
provider = "sqlite"
url = "file:./../config/rss_bot_database.db"
}
model rss {
id Int @id @unique(map: "sqlite_autoindex_rss_1") @default(autoincrement())
link String
last String
name String
chat_id Int @default(0)
}
model setting {
id Int @id @unique @default(autoincrement())
show_changelog Boolean @default(true)
last_version String
chat_id Int @unique
delay Int
}
I get the following error:
npx prisma migrate dev --name multichat
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": SQLite database "rss_bot_database.db" at "file:./../config/rss_bot_database.db"
- The migration `20220503190343_multichat` failed.
- Drift detected: Your database schema is not in sync with your migration history.
The following is a summary of the differences between the expected database schema given your migrations files, and the actual schema of the database.
It should be understood as the set of changes to get from the expected schema to the actual schema.
[+] Added tables
- rss
[*] Changed the `rss` table
[+] Added unique index on columns (name)
[+] Added unique index on columns (link)
[+] Added unique index on columns (id)
- The migrations recorded in the database diverge from the local migrations directory.
✔ We need to reset the SQLite database "rss_bot_database.db" at "file:./../config/rss_bot_database.db".
Do you want to continue? All data will be lost.
I am new to prisma, what can I do? It makes no sense 😢Nurul
05/24/2022, 12:26 PMNorbert Takács
05/24/2022, 12:59 PM