CREATE TABLE `FOLLOWERS`
(`FOLLOWER_ID` char(255) COLLATE utf8_unicode_ci NOT NULL,
`FOLLOWING_ID` char(255) COLLATE utf8_unicode_ci NOT NULL,
`FOLLOWING_IN` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP)
ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
How can I prevent duplicate entries over multiple columns?
For example, I don't need anything like this
FOLLOWER_ID | FOLLOWING_ID | FOLLOWING_IN |
---|---|---|
283 | 283 | ... |
193 | 283 | ... |
908 | 908 | ... |
- First row = Bad
- Second = Good
- Third = Bad
And I want to ask, Is the followers' table looks good design?