#184 not null problems

MySQL (69)

when I define a table via adminer I cannot set a column to be "not null". On the other hand if I set a column to be "null" and reload the table structure the checkbox for "NULL" is unchecked so I never can remove the "NULL" from that column again. That's just some tiny ui bug but limiting adminer a lot.

The problem with not null is when you define a column which is not of type int and a primary key then you can insert empty primary keys. I defined a table "makes" with the primary key "name" which is a varchar. As I cannot set it to "not null" I can input empty data (yes, I'm using innodb). For me this isn't a problem but it's not me entering the data in to the database so it's a crucial requirement.

Hope it helps to improve adminer which I think is a great alternative to phpmyadmin. It's also pleasent to use on the ipad where the current phpmyadmin 3 doesn't work.

Andreas Schipplock.


  • Jakub Vrána

    Jakub Vrána - 2011-08-14
    • status: open --> closed-invalid
  • Jakub Vrána

    Jakub Vrána - 2011-08-14

    All columns created by Adminer is NOT NULL by default. Only if you set the NULL checkbox then the can hold NULL.

    Primary keys couldn't be created from NULL columns. It's a MySQL feature and Adminer couldn't do anything about it.

  • Comment has been marked as spam. 

    You can see all pending comments posted by this user  here

    Anonymous - 2011-08-14

    yes, I was wrong. When I define a primary key with type varchar I can insert '' values which is not null but empty. My expectation was wrong. I solved the issue with a trigger now which deletes the row when the value is empty.

    Thanks for the quick reply.


Log in to post a comment.