timwis / dataface

Build and manage data with a spreadsheet-like interface
https://dataface-demo.herokuapp.com
43 stars 4 forks source link

Always show a blank row at the bottom to "add" a row #18

Closed timwis closed 7 years ago

timwis commented 7 years ago

But this forces us to think about how primary keys are generated. We wouldn't want you to have to type in your own auto-incrementing ID.

Options:

  1. Hide the primary key field (or at least make it not editable). The problem here is sometimes primary keys can be something other than the auto-incrementing ID.
  2. Force dataface tables to use an auto-incrementing ID for the primary key, then make it not editable (and perhaps hide it).
  3. The schema of the table should include the default attribute of each field. If it's set to "autoincrement" (or whatever it's called in postgres), prevent it being editable (at least on new records). I think this one's ideal.