From bc0545a3c88e092143e27b9dc6b7089634ab72ea Mon Sep 17 00:00:00 2001 From: Alexandr Nesterenko Date: Fri, 16 Feb 2018 11:40:04 +0300 Subject: [PATCH] reduse db size (1) --- frontend/frontend/migrations/0008_auto_20180215_1445.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/frontend/migrations/0008_auto_20180215_1445.py b/frontend/frontend/migrations/0008_auto_20180215_1445.py index d7240e9..44fd19e 100644 --- a/frontend/frontend/migrations/0008_auto_20180215_1445.py +++ b/frontend/frontend/migrations/0008_auto_20180215_1445.py @@ -12,10 +12,10 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RunSQL("ALTER TABLE `frontend_post` ADD COLUMN `md5sum2` BINARY(16) DEFAULT 0 NOT NULL;" + migrations.RunSQL("ALTER TABLE `frontend_post` ADD COLUMN `md5sum2` BINARY(128) DEFAULT 0 NOT NULL;" "UPDATE `frontend_post` set `md5sum2` = unhex(`md5sum`);" "ALTER TABLE frontend_post DROP COLUMN md5sum;" - "ALTER TABLE frontend_post CHANGE COLUMN md5sum2 md5sum BINARY(16) NOT NULL;" + "ALTER TABLE frontend_post CHANGE COLUMN md5sum2 md5sum BINARY(128) NOT NULL;" "CREATE INDEX md5sum_index USING HASH ON frontend_post (feed_id, md5sum);", state_operations=[ migrations.AlterField(