diff options
author | Thomas Lange <code@nerdmind.de> | 2021-06-17 00:18:34 +0200 |
---|---|---|
committer | Thomas Lange <code@nerdmind.de> | 2021-06-17 00:18:34 +0200 |
commit | fefa367242de85f46250fb8da46dbae3f5545836 (patch) | |
tree | 135c54d4cd07abababddf30d891bd8dce0e4b1ea /core/db/migrations/3.sql | |
parent | 85d6e75d4c77d13f6f5c0c7bc75f6ed48ee6df6c (diff) | |
download | blog-fefa367242de85f46250fb8da46dbae3f5545836.tar.gz blog-fefa367242de85f46250fb8da46dbae3f5545836.tar.xz blog-fefa367242de85f46250fb8da46dbae3f5545836.zip |
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.
Diffstat (limited to 'core/db/migrations/3.sql')
-rw-r--r-- | core/db/migrations/3.sql | 6 |
1 files changed, 6 insertions, 0 deletions
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; |