Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alter table Payment add column referenceType text not null - Cannot add a NOT NULL column with default value NULL #777

Closed
AballahNsour opened this issue Nov 28, 2023 · 2 comments · Fixed by #782
Labels
bug Something isn't working

Comments

@AballahNsour
Copy link

Description

Add some description...

Steps to Reproduce

Add steps to reproduce the error...

Info

Error: DatabaseError: SqliteError
alter table Payment add column referenceType text not null - Cannot add a NOT NULL column with default value NULL

Stack:

SqliteError: alter table `Payment` add column `referenceType` text not null - Cannot add a NOT NULL column with default value NULL
    at Function.get (/Users/abdallah/Desktop/Developer/Accounting/books/node_modules/knex/lib/knex-builder/make-knex.js:43:26)
    at DatabaseCore.
@mildred mildred added the bug Something isn't working label Dec 3, 2023
@mildred
Copy link
Contributor

mildred commented Dec 3, 2023

This is from the master branch, caused by #743

Either stop marking the field as required, and update code to gracefully handle NULL values, or provide a default value, or find a way to migrate the data and programatically provide the value for this field

@mildred mildred changed the title cannot find my company data alter table Payment add column referenceType text not null - Cannot add a NOT NULL column with default value NULL Dec 3, 2023
@mildred
Copy link
Contributor

mildred commented Dec 3, 2023

In the meantime use a previous version of Books

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants