hankinsoft / SQLPro

SQLPro bug & features tracking.
104 stars 27 forks source link

Adding new varchar column doesn't clear out Size value. #856

Closed kwadsten closed 1 year ago

kwadsten commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior Size field should probably not default to "128" for any of the datatypes except perhaps for text/char.

Screenshots If applicable, add screenshots to help explain your problem.

CleanShot 2022-11-29 at 11 34 12@2x

Environment (please complete the following information):

Device: Mac Studio OS: macOS 13.0.1 (Ventura) SQLPro for SQLite Version 2022.96 (Build 4296) Target database server: Local SQlite database

Additional context Add any other context about the problem here.

NOTE If your environmental details above were not completely filled in, the bug report will be closed until they are provided.

hankinsoft commented 1 year ago

In SQLite char and varchar are the same thing (they are both handled by the TEXT affinity) (https://www.sqlite.org/datatype3.html).

Varchar will continue to have a default size to maintain compatibility with other database types such as mysql in which a size would be required for varchar (https://dev.mysql.com/doc/refman/8.0/en/char.html).