Bug 408012 - Editing Max Length property of table field requires data removal
Summary: Editing Max Length property of table field requires data removal
Status: CONFIRMED
Alias: None
Product: KEXI
Classification: Applications
Component: Tables (show other bugs)
Version: 3.1.0
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: Kexi Bugs
URL: https://phabricator.kde.org/T10999
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-28 03:56 UTC by Swarup
Modified: 2019-06-20 22:01 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Swarup 2019-05-28 03:56:32 UTC
SUMMARY
Kexi Version 3.1.0. If one goes into design view and changes the settings, such as the setting for the number of characters allowed in each cell, the program warns it will delete all the data in the table upon saving the design change.


STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Jarosław Staniek 2019-05-28 13:55:55 UTC
Confirmed, thanks. 

Manual workaround for any KEXI version:

1. Close your KEXI database and back up it.
2. Open the sqliteman app or equivalent one. 
Note: You can do the same with sqlite3 console app if you have skills. You can do the same with MySQL Admin or PostgreSQL Admin for server KEXI databases.
3. For given table T run this query to find out its id: select o_id from kexi__objects where o_name='T'. Note down the o_id number.
4. For that o_id value (e.g. 217) and for given length (e.g. 1000) and field name (e.g. 'c') run this query: update kexi__fields set f_length=1000 where t_id=217 and f_name='c'
5. Repeat steps 3 and 4 for any number of tables and fields you need. You can use skip the "and f_name='c'" part of the query to set all fields in the table to give length.
Note: This operation does not truncate or extend length of actual data, you need to do that separately using other queries. This makes implementation of the task more complex than it looks: actual data modification may be needed.
Comment 2 Jarosław Staniek 2019-05-28 15:01:28 UTC
"DB Browser for SQLite" also works for the above workaround: https://sqlitebrowser.org/dl/
Comment 3 Swarup 2019-06-20 21:44:43 UTC
There has got to be a simpler, easier solution to this matter for the ordinary user. Such a complex, technical workaround. I could never follow it. Please kindly set up something which is a reasonable solution for the common user. I have great need to allow larger number of characters in each cell. If you want the common public to use Kexi, this sort of techy workaround has to be moved beyond. I beg you to figure out a better solution.
Comment 4 Jarosław Staniek 2019-06-20 22:01:00 UTC
Thanks, the report is confirmed now and there is only workaround which is not counted as right solution of course.