Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reviewflags table doesn't have a primary key #22

Closed
dfabulich opened this issue Jan 27, 2021 · 0 comments
Closed

reviewflags table doesn't have a primary key #22

dfabulich opened this issue Jan 27, 2021 · 0 comments

Comments

@dfabulich
Copy link
Collaborator

https://github.com/iftechfoundation/ifdb/blob/main/sql/patch-schema.sql#L146-L154

CREATE TABLE `reviewflags` (
  `reviewid` bigint(20) NOT NULL,
  `flagger` varchar(32) COLLATE latin1_german2_ci NOT NULL,
  `flagtype` char(1) COLLATE latin1_german2_ci NOT NULL,
  `notes` mediumtext COLLATE latin1_german2_ci,
  `created` datetime NOT NULL,
  KEY `reviewid` (`reviewid`),
  KEY `flagger` (`flagger`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci;

This table doesn't have a primary key. reviewid is a foreign key to the reviews table.

As a result, if you try to poke around this table in phpMyAdmin, it says, "Current selection does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available."

We should add an autoincrementing primary key id to make that message go away and make it easier to work with this table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant