Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Add an auto increment primary key

Help
2005-03-10
2013-05-14
  • Nicholas Smith
    Nicholas Smith
    2005-03-10

    According to a tutorial I was reading on sqlite I should be able to define an auto-incrementing field something like:

    user_id integer primary key

    But sqlite-browser removes all the spaces from the custom type, so I end up with:

    user_id INTEGERPRIMARYKEY

    The cause is in the file (from the packaged source on the site): editfieldform.ui.h, in the function ::getCustomType(), line 50

        QString nospaces = addForm->typeNameEdit->text().remove(" ");

    I think it would make sense not to even strip spaces (I guess just stripping any leading and trailing whitespace would still be ok).

    Nick

     
    • Nice suggestion, we should definately allow this in the UI. You can however use the SQL window (as you probably know) as a quick workaround for now.