We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent efa34fa commit 01ec775Copy full SHA for 01ec775
1 file changed
chats/migrations/0003_reply_to_constaint.py
@@ -0,0 +1,27 @@
1
+# Generated by Django 4.1.3 on 2023-02-08 12:55
2
+
3
+from django.db import migrations
4
5
6
+class Migration(migrations.Migration):
7
8
+ dependencies = [
9
+ ("chats", "0002_directchatmessage_is_deleted_and_more"),
10
+ ]
11
12
+ operations = [
13
+ # migrations.RunSQL(
14
+ # sql="""
15
+ # ALTER TABLE chats_directchatmessage
16
+ # ADD CONSTRAINT my_constraint
17
+ # CHECK (
18
+ # (chats_directchatmessage.reply_to_id IS NULL) OR
19
+ # (chats_directchatmessage.chat_id = (SELECT chats_directchatmessage.chat_id FROM chats_directchatmessage WHERE chats_directchatmessage.id = chats_directchatmessage.reply_to_id))
20
+ # )
21
+ # """,
22
+ # reverse_sql="""
23
24
+ # DROP CONSTRAINT my_constraint
25
+ # """)
26
27
0 commit comments