Default value for primary keys incorrect
Issue #149
resolved
Originally reported on Google Code with ID 149
What steps will reproduce the problem?
For the primary key in a table, even though Not Null = yes, the Default Value is shown
as NULL. Rather let it show as "None" (in Italics), as is done in phpmyadmin for MySQL.
What version of the product are you using? On what operating system?
phpLiteAdmin v1.9.3; Windows XP SP3
Which
Database Extension (PDO/SQLiteDatabase/SQLiteDatabase3 - see Database
structure-tab in phpLiteAdmin)?
SQLite version: 2.8.17
SQLite extension: SQLiteDatabase
Reported by jgjooste
on 2012-11-21 16:01:44
Comments (12)
-
-
Ah sorry. I did not notice you were talking about primary keys. But this statement does not create a problem here: CREATE TABLE 'test_149_3' ('primary' INTEGER PRIMARY KEY NOT NULL) This one does: CREATE TABLE 'test_149_4' ('primary' INTEGER PRIMARY KEY NOT NULL DEFAULT NULL) But this again doesn't make much sense.
Reported by
crazy4chrissi
on 2012-11-21 17:32:18 -
This issue was closed by revision r304.
Reported by
crazy4chrissi
on 2012-11-21 18:52:29 - Status changed:Fixed
-
I was now able to reproduce the real issue in 1.9.4 (not 1.9.3). I think we introduced the problem lately. I just fixed it in SVN.
Reported by
crazy4chrissi
on 2012-11-21 18:52:57 -
P.S.: Thanks for reporting this. Please confirm the fix.
Reported by
crazy4chrissi
on 2012-11-21 18:53:36 -
Account Deleted Thanks, looks like it is working now. But why not just show the default value of the primary key as "None", as is done in phpmyadmin for MySQL?
Reported by
jgjooste
on 2012-11-27 10:43:02 -
Hmm... well, I'd say it's a matter of taste. But I guess using NONE (without quotes, so it can be distinguished from the string 'NONE'), maybe in italics to make clear it is not a normal value, might be a good idea. Because with an empty cell, people might assume an empty string is the default or null is the default. We should make all these cases unambiguously understandable.
Reported by
crazy4chrissi
on 2012-11-27 13:39:03 - Status changed:Accepted
-
Account Deleted My vote goes for "None" (without quotes, and in Italics; and not "NONE").
Reported by
jgjooste
on 2012-11-27 14:00:00 -
Okay. Well, I thought to use uppercase like for NULL, but for NULL this is pretty standard. Maybe "None" looks a bit more friendly ;-)
Reported by
crazy4chrissi
on 2012-11-27 14:01:55 -
This issue was closed by revision r434.
Reported by
crazy4chrissi
on 2013-12-25 16:04:59 - Status changed:Fixed
-
Reported by
crazy4chrissi
on 2014-01-02 16:24:03 - Labels added: Target-1.9.5 -
Reported by
crazy4chrissi
on 2014-01-02 16:24:10 - Log in to comment
Reported by
crazy4chrissi
on 2012-11-21 16:53:23