This commit is contained in:
2024-05-28 10:52:28 +02:00
parent 8ad02e67f7
commit a5a322cd38
19 changed files with 171 additions and 146 deletions
+12
View File
@@ -0,0 +1,12 @@
CREATE MIGRATION m1zlzfafekdlqfpf7zcj4taysmccydrzclqrkxjogkermv4qcn4wia
ONTO m1xiilci36z6h4kris43l3gb6w63y7lbql3ismz7coxobr6r2yhz6a
{
CREATE REQUIRED GLOBAL default::currentConversationID -> std::str {
SET default := '';
};
ALTER GLOBAL default::currentConversation USING (std::assert_single((SELECT
default::Conversation
FILTER
((.user = GLOBAL default::currentUser) AND ((.id = <std::uuid>GLOBAL default::currentConversationID) OR ((GLOBAL default::currentConversationID = '') AND (.name = 'Default'))))
)));
};
+5
View File
@@ -0,0 +1,5 @@
CREATE MIGRATION m1f65xatu7epwthdl6s4yekiuusexvyk2w747gdt5ixzzggxzliyga
ONTO m1zlzfafekdlqfpf7zcj4taysmccydrzclqrkxjogkermv4qcn4wia
{
ALTER GLOBAL default::currentConversationID SET default := '00000000-0000-0000-0000-000000000000';
};
+14
View File
@@ -0,0 +1,14 @@
CREATE MIGRATION m1nb4byflyh4jp3yp6zdr6ydzw7btucfslsznwz7ooywnmbjxqyl6q
ONTO m1f65xatu7epwthdl6s4yekiuusexvyk2w747gdt5ixzzggxzliyga
{
DROP GLOBAL default::currentConversation;
DROP GLOBAL default::currentConversationID;
CREATE REQUIRED GLOBAL default::currentConversationID -> std::uuid {
SET default := (<std::uuid>'00000000-0000-0000-0000-000000000000');
};
CREATE GLOBAL default::currentConversation := (std::assert_single((SELECT
default::Conversation
FILTER
((.user = GLOBAL default::currentUser) AND ((.id = GLOBAL default::currentConversationID) OR ((GLOBAL default::currentConversationID = <std::uuid>'00000000-0000-0000-0000-000000000000') AND (.name = 'Default'))))
)));
};