forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path0016_remove_sessionpresentation_document.py
More file actions
34 lines (27 loc) · 1.06 KB
/
0016_remove_sessionpresentation_document.py
File metadata and controls
34 lines (27 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Copyright The IETF Trust 2019-2020, All Rights Reserved
# -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-05-21 03:57
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('doc', '0018_remove_old_document_field'),
('meeting', '0015_sessionpresentation_document2_fk'),
]
operations = [
# We need to get rid of the current through table uniqueness
# constraint before we can remove the document column: The table
# has "UNIQUE KEY `session_id` (`session_id`,`document_id`)"
migrations.RunSQL(
"ALTER TABLE `meeting_session_materials` DROP INDEX `session_id`;",
"CREATE UNIQUE INDEX `session_id` ON `meeting_session_materials` (`session_id`, `document_id`);"
),
## This doesn't work:
# migrations.RemoveIndex(
# model_name='sessionpresentation',
# name='session_id'
# ),
migrations.RemoveField(
model_name='sessionpresentation',
name='document',
),
]