iftechfoundation / ifdb

The software behind the Interactive Fiction Database (IFDB)
Other
25 stars 18 forks source link

Add primary keys to every table #1017

Open dfabulich opened 2 weeks ago

dfabulich commented 2 weeks ago

A bunch of tables have no primary key, making it very difficult to work with these tables. We should add a computed primary key to allo of them.

List of tables with no primary key

``` select table_name from information_schema.tables where table_schema='ifdb' and table_type='BASE TABLE' and table_name not in (select table_name from information_schema.columns where table_schema='ifdb' and column_key='PRI') order by table_name; +------------------+ | table_name | +------------------+ | audit | | clubmembers | | compgames | | compprofilelinks | | comps_history | | downloadhelp | | extreviews | | formatprivs | | gamelinks | | gameprofilelinks | | games_history | | gametags | | gamexrefs | | iso639x | | logins | | nonces | | osprivs | | playedgames | | pollcomments | | pollvotes | | privileges | | reclistitems | | reviewflags | | reviewtags | | reviewvotes | | tagstats | | unwishlists | | userfilters | | wishlists | +------------------+ ```

dfabulich commented 2 weeks ago

This will make it easier to port to InnoDB #1016