v/pol
1
0
mirror of https://github.com/taroved/pol synced 2025-05-16 14:20:10 -07:00

reduse db size (1)

This commit is contained in:
Alexandr Nesterenko 2018-02-16 11:40:04 +03:00
parent 2abe04457c
commit bc0545a3c8

View File

@ -12,10 +12,10 @@ class Migration(migrations.Migration):
] ]
operations = [ 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`);" "UPDATE `frontend_post` set `md5sum2` = unhex(`md5sum`);"
"ALTER TABLE frontend_post DROP COLUMN 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);", "CREATE INDEX md5sum_index USING HASH ON frontend_post (feed_id, md5sum);",
state_operations=[ state_operations=[
migrations.AlterField( migrations.AlterField(