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

Bug: Creation of a new database fails during initial setup while migrating it #162

Closed
noseshimself opened this issue Jul 27, 2022 · 2 comments
Labels

Comments

@noseshimself
Copy link

noseshimself commented Jul 27, 2022

Version: master of 20220720

Environment:
kraftrc:

[WindowSizes]

[document]
DefaultTaxType=1
ShowDocumentLocale=true

[reporting]
PdfOutputDir=/home/ap/NextCloud/BNC/Kraft/PDF

[system]
DoXmlArchive=true
XmlArchivePath=/home/ap/NextCloud/BNC/Kraft/Archiv
mailUA=thunderbird
oldmailUA=xdg

[userdefaults]
DateFormat=ISO
InsertTemplChapterName=Sonstige
doctype=Rechnung
greeting=Anrede

kraftdatabaserc:

[Sqlite settings]
DbFileOld=/home/ap/.local/share/kraft/kraft.db
DbFile=/home/ap/iNextCloud/BNC/Kraft/database/kraft.db
DbPathnotworking=/home/ap/NextCloud/BNC/Kraft/database/

[database selection]
DbDriver=QSQLITE
ap@devel:~/NextCloud/BNC

Screenshot 2022-07-27 18 05 08

Console output up to that point:

Appending 10 commands for version 24
11  commands performed well, version is  2 , listversion: 2
2  commands performed well, version is  3 , listversion: 3
27  commands performed well, version is  4 , listversion: 4
20  commands performed well, version is  5 , listversion: 5
0  commands performed well, version is  6 , listversion: 6
0  commands performed well, version is  7 , listversion: 7
7  commands performed well, version is  8 , listversion: 8
1  commands performed well, version is  9 , listversion: 9
17  commands performed well, version is  10 , listversion: 10
0  commands performed well, version is  11 , listversion: 11
3  commands performed well, version is  12 , listversion: 12
0  commands performed well, version is  13 , listversion: 13
3  commands performed well, version is  14 , listversion: 14
0  commands performed well, version is  15 , listversion: 15
5  commands performed well, version is  16 , listversion: 16
2  commands performed well, version is  17 , listversion: 17
3  commands performed well, version is  18 , listversion: 18
8  commands performed well, version is  19 , listversion: 19
4  commands performed well, version is  20 , listversion: 20
2  commands performed well, version is  21 , listversion: 21
2  commands performed well, version is  22 , listversion: 22
###### Failed SQL Command  "ALTER TABLE Catalog DROP COLUMN lastUsed;" :  "near \"DROP\": syntax error Der Befehl konnte nicht ausgeführt werden"

###### Failed SQL Command  "ALTER TABLE Catalog DROP COLUMN useCounter;" :  "near \"DROP\": syntax error Der Befehl konnte nicht ausgeführt werden"

Only performned  2  out of  4

After quitting Kraft and starting it again I'm getting
Screenshot 2022-07-27 18 34 29
and the database setup is retried (and will fail of course again). I can abort the setup and work with that database but it's getting annoying to see it on every start.

@dragotin dragotin added the bug label Jul 30, 2022
@dragotin
Copy link
Owner

dragotin commented Aug 9, 2022

Aha, you're using a rather old sqlite version, ALTER TABLE DROP COLUMN is only supported in sqlite versions starting from 3.35: https://sqlite.org/changes.html#version_3_35_0

I will remove the drop column statement as robustness is more important than an unused column in this case.

dragotin added a commit that referenced this issue Aug 9, 2022
That is only supported in the rather new version that is not avialable
everywhere.

fixes bug #162
@dragotin
Copy link
Owner

dragotin commented Aug 9, 2022

Should be fixed with the referenced commit.

@dragotin dragotin closed this as completed Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants