From fefa367242de85f46250fb8da46dbae3f5545836 Mon Sep 17 00:00:00 2001
From: Thomas Lange <code@nerdmind.de>
Date: Thu, 17 Jun 2021 00:18:34 +0200
Subject: Add migrations directory

This commit adds the directory core/db/migrations/ which contains all
migrations that were applied to the database since the first release.
---
 core/db/migrations/3.sql | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 core/db/migrations/3.sql

(limited to 'core/db/migrations/3.sql')

diff --git a/core/db/migrations/3.sql b/core/db/migrations/3.sql
new file mode 100644
index 0000000..ae46ed0
--- /dev/null
+++ b/core/db/migrations/3.sql
@@ -0,0 +1,6 @@
+ALTER TABLE `post` ENGINE=InnoDB;
+ALTER TABLE `post` DROP INDEX `body`;
+ALTER TABLE `page` ADD FULLTEXT KEY `search` (`name`, `body`);
+ALTER TABLE `post` ADD FULLTEXT KEY `search` (`name`, `body`);
+ALTER TABLE `post` ADD CONSTRAINT `post_user` FOREIGN KEY (`user`)
+	REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
-- 
cgit v1.2.3

