Download & Extend

Index field (Primary key)

Project:Table Wizard
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

While I understand the value to go set a field to be PK for relationships, etc, I can't understand why we don't have the option to create a index field when the table is build on CSV import.

Currently I import a file. In phpmyadmin I then delete all rows, create a new field (ID): Integer, auto-inc, PK, not-null.
Then I re-import the file again. If I don't delete the rows first, the ID field is not indexed and I obviously get null errors.

It would be nice in the tw UI to have the option to add an index field to the imported file, so that it is created when the table is created and the data is indexed when the data is imported.

Or do I miss the boat here?

Comments

#1

#2

Status:closed (duplicate)» active

Those two issues deal with a field in the CSV to be used as PK. It is because of them that I made this feature request.

Maybe I did not express myself clearly.
It would be nice that the tw module can create the PK field and add it to the table during CREATE TABLE {mytable}.......
Example, before you do an import, you have the option to fill in a textfield with the field name and it to be added onto the table and set as PK and auto increment.
When the data is loaded into the table, then the table gets indexed.