Fixed revisions table losing originalIndex when article was deleted

I've also included a migration file in the tools directory
This commit is contained in:
2021-11-17 06:16:33 +00:00
parent c30cf80fc6
commit 3bb0b2aa29
4 changed files with 14 additions and 5 deletions
+6
View File
@@ -0,0 +1,6 @@
use news;
ALTER TABLE revisions CHANGE COLUMN id `index` INTEGER(11) UNIQUE NOT NULL AUTO_INCREMENT;
ALTER TABLE revisions DROP FOREIGN KEY revisions_ibfk_1;
ALTER TABLE revisions CHANGE COLUMN originalIndex originalIndex INTEGER(11);