Skip to content

An AI-powered search engine with a generative UI

fix(db): correct 0016 journal timestamp and format drizzle meta files (#905)

Yoshiki Miura2e3e113e13a0
diff --git a/drizzle/meta/0016_snapshot.json b/drizzle/meta/0016_snapshot.json
index 15af5255..f1ceed39 100644
--- a/drizzle/meta/0016_snapshot.json
+++ b/drizzle/meta/0016_snapshot.json
@@ -123,9 +123,7 @@
"name": "users_manage_own_chats",
"as": "PERMISSIVE",
"for": "ALL",
- "to": [
- "public"
- ],
+ "to": ["public"],
"using": "user_id = current_setting('app.current_user_id', true)",
"withCheck": "user_id = current_setting('app.current_user_id', true)"
},
@@ -133,9 +131,7 @@
"name": "public_chats_readable",
"as": "PERMISSIVE",
"for": "SELECT",
- "to": [
- "public"
- ],
+ "to": ["public"],
"using": "visibility = 'public'"
}
},
@@ -230,27 +226,21 @@
"name": "feedback_select_policy",
"as": "PERMISSIVE",
"for": "SELECT",
- "to": [
- "public"
- ],
+ "to": ["public"],
"using": "true"
},
"anyone_can_insert_feedback": {
"name": "anyone_can_insert_feedback",
"as": "PERMISSIVE",
"for": "INSERT",
- "to": [
- "public"
- ],
+ "to": ["public"],
"withCheck": "true"
},
"users_anonymize_own_feedback": {
"name": "users_anonymize_own_feedback",
"as": "PERMISSIVE",
"for": "UPDATE",
- "to": [
- "public"
- ],
+ "to": ["public"],
"using": "user_id = current_setting('app.current_user_id', true)",
"withCheck": "user_id IS NULL"
}
@@ -342,13 +332,9 @@
"messages_chat_id_chats_id_fk": {
"name": "messages_chat_id_chats_id_fk",
"tableFrom": "messages",
- "columnsFrom": [
- "chat_id"
- ],
+ "columnsFrom": ["chat_id"],
"tableTo": "chats",
- "columnsTo": [
- "id"
- ],
+ "columnsTo": ["id"],
"onUpdate": "no action",
"onDelete": "cascade"
}
@@ -360,9 +346,7 @@
"name": "users_manage_chat_messages",
"as": "PERMISSIVE",
"for": "ALL",
- "to": [
- "public"
- ],
+ "to": ["public"],
"using": "EXISTS (\n SELECT 1 FROM \"chats\"\n WHERE \"chats\".id = chat_id\n AND \"chats\".user_id = current_setting('app.current_user_id', true)\n )",
"withCheck": "EXISTS (\n SELECT 1 FROM \"chats\"\n WHERE \"chats\".id = chat_id\n AND \"chats\".user_id = current_setting('app.current_user_id', true)\n )"
},
@@ -370,9 +354,7 @@
"name": "public_chat_messages_readable",
"as": "PERMISSIVE",
"for": "SELECT",
- "to": [
- "public"
- ],
+ "to": ["public"],
"using": "EXISTS (\n SELECT 1 FROM \"chats\"\n WHERE \"chats\".id = chat_id\n AND \"chats\".visibility = 'public'\n )"
}
},
@@ -667,13 +649,9 @@
"parts_message_id_messages_id_fk": {
"name": "parts_message_id_messages_id_fk",
"tableFrom": "parts",
- "columnsFrom": [
- "message_id"
- ],
+ "columnsFrom": ["message_id"],
"tableTo": "messages",
- "columnsTo": [
- "id"
- ],
+ "columnsTo": ["id"],
"onUpdate": "no action",
"onDelete": "cascade"
}
@@ -685,9 +663,7 @@
"name": "users_manage_message_parts",
"as": "PERMISSIVE",
"for": "ALL",
- "to": [
- "public"
- ],
+ "to": ["public"],
"using": "EXISTS (\n SELECT 1 FROM \"messages\"\n INNER JOIN \"chats\" ON \"chats\".id = \"messages\".chat_id\n WHERE \"messages\".id = message_id\n AND \"chats\".user_id = current_setting('app.current_user_id', true)\n )",
"withCheck": "EXISTS (\n SELECT 1 FROM \"messages\"\n INNER JOIN \"chats\" ON \"chats\".id = \"messages\".chat_id\n WHERE \"messages\".id = message_id\n AND \"chats\".user_id = current_setting('app.current_user_id', true)\n )"
},
@@ -695,9 +671,7 @@
"name": "public_chat_parts_readable",
"as": "PERMISSIVE",
"for": "SELECT",
- "to": [
- "public"
- ],
+ "to": ["public"],
"using": "EXISTS (\n SELECT 1 FROM \"messages\"\n INNER JOIN \"chats\" ON \"chats\".id = \"messages\".chat_id\n WHERE \"messages\".id = message_id\n AND \"chats\".visibility = 'public'\n )"
}
},
@@ -737,4 +711,4 @@
"schemas": {},
"tables": {}
}
-}
\ No newline at end of file
+}
diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json
index 9ac43d65..7ee9b94b 100644
--- a/drizzle/meta/_journal.json
+++ b/drizzle/meta/_journal.json
@@ -117,9 +117,9 @@
{
"idx": 16,
"version": "7",
- "when": 1782591772987,
+ "when": 1782604800001,
"tag": "0016_wrap_rls_current_setting",
"breakpoints": true
}
]
-}
\ No newline at end of file
+}