Error using totvs database: `Couldn\'t parse default value`
See original GitHub issueHi Prisma Team! Prisma Migrate just crashed.
Versions
Name | Version |
---|---|
Platform | debian-openssl-1.1.x |
Node | v14.15.4 |
Prisma CLI | 2.15.0 |
Binary | e51dc3b5a9ee790a07104bec1c9477d51740fe54 |
Error
Error: [libs/sql-schema-describer/src/mssql.rs:264:30] called `Result::unwrap()` on an `Err` value: "Couldn\'t parse default value: `CREATE DEFAULT DEF_DLOGICONULL AS 0\r\n`"
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Consultor Eletrônico - totvs
10180 - Error reading Fathom defaults file: "<message for failure>" (10180), Progress, Progress Software Corporation. 10181 - Error parsing Fathom defaults ...
Read more >Error in MySQL when setting default value for DATE or ...
I got into a situation where the data was mixed between NULL and 0000-00-00 for a date field ...
Read more >Prisma 2.18.0 Release - GitClear
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, ... Error using totvs database: Couldn\'t parse default value ......
Read more >Linha Datasul - tdn totvs
1013 The configuration registry key could not be written. 1014 One of the files in the Registry database had to be recovered by...
Read more >couchbase/discuss - Gitter
Hey all - looking for some help trying to get data out of couchbase in a very ... -prototype.default.svc:<0.331.0>:menelaus_web:loop:143]Server error during ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I can replicate the bug. There seems to be another way of setting default values in SQL Server. Typically, we create defaults like this:
There is another way of creating default values too in SQL Server, you can define them beforehand, and use a stored procedure to set them to a column:
So, this kind of makes our migrations a bit problematic. We’d like to have the default values in the data model, and then point to them from the column declaration to get the correct result. I need to discuss this a bit with the team, if we could find a nice and easy solution, or will this stretch to a complete new feature.
Documentation change for this: https://github.com/prisma/docs/pull/1348