Skip to content

Commit

Permalink
Install script: boolean columns + ContentId
Browse files Browse the repository at this point in the history
  • Loading branch information
yumi-xx committed May 17, 2020
1 parent 618b860 commit 9a88bf5
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions bin/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,17 @@
`Year` int(4) NOT NULL DEFAULT year(`Created`),
`Topic` int(11) NOT NULL,
`Content` text NOT NULL DEFAULT '',
`User` VARCHAR(64),
`Deleted` bit DEFAULT 0 NOT NULL,
`LearnedAsSpam` bit(1) DEFAULT NULL,
`IsSpam` bit(1) NOT NULL DEFAULT b'0',
`ContentId` int(11) NOT NULL AUTO_INCREMENT,
`User` VARCHAR(64) DEFAULT '',
`UserIdentity` VARCHAR(64) DEFAULT '',
`Deleted` TINYINT(1) DEFAULT 0 NOT NULL,
`LearnedAsSpam` TINYINT(1) NOT NULL DEFAULT 0,
`IsSpam` TINYINT(1) NOT NULL DEFAULT 0,
`Visible` bit(1) GENERATED ALWAYS AS
(`IsSpam` = 0 and `Deleted` = 0) VIRTUAL,
PRIMARY KEY (`Continuity`,`Year`,`Topic`,`Id`)
PRIMARY KEY (`Continuity`,`Year`,`Topic`,`Id`),
UNIQUE KEY `ContentId` (`ContentId`),
FULLTEXT KEY `index_name` (`Content`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
SQL;
$queries[] = <<<SQL
Expand Down

0 comments on commit 9a88bf5

Please sign in to comment.